package a.f.d.a;

import a.c.bb;
import a.c.e;
import a.c.m;
import a.c.v;
import a.d.f;
import a.f.cd;
import a.f.o;
import a.f.wc;
import a.f.zb;
import a.f.zc;

import java.util.*;

class w
  implements ed
{
  private static final double a = Math.sqrt(2.0D);
  private k b;
  private hb c;
  private boolean d;
  private boolean e = true;
  private boolean f;
  private double g = 0.2D;
  private double h = 150.0D;
  private double i = 10.0D;
  private double j = 20.0D;
  private double k = 10.0D;
  private double l = 15.0D;
  private double m = 0.0D;
  private boolean n = false;
  private double o = 10.0D;
  private boolean p = false;
  private double q = 10.0D;
  private boolean r;
  private Map s;
  private long t = 9223372036854775807L;
  private List u = new ArrayList();
  private List v = new ArrayList();
  private List w = new ArrayList();
  private List x;
  private List y;
  private Map z;
  private pc A;
  private pc B;
  
  w(k paramk, hb paramhb)
  {
    this.b = paramk;
    this.c = paramhb;
  }
  
  public void a(boolean paramBoolean)
  {
    this.f = paramBoolean;
  }
  
  public boolean a()
  {
    return this.f;
  }
  
  public boolean b()
  {
    return this.r;
  }
  
  public void b(boolean paramBoolean)
  {
    this.r = paramBoolean;
  }
  
  void a(Map paramMap)
  {
    boolean bool = d.R;
    this.s = paramMap;
    Object localObject = paramMap.get("DefaultEdgeRouter.minimumNodeToEdgeDistance");
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        a(((Number)localObject).doubleValue());
      }
      localObject = paramMap.get("DefaultEdgeRouter.enforceExactLayering");
    }
    if (!bool)
    {
      if ((localObject instanceof Boolean)) {
        b(((Boolean)localObject).booleanValue());
      }
      localObject = paramMap.get("DefaultEdgeRouter.minimumEdgeDistance");
    }
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        b(((Number)localObject).doubleValue());
      }
      localObject = paramMap.get("DefaultEdgeRouter.polygonalGroupRoutingEnabled");
    }
    if (!bool)
    {
      if ((localObject instanceof Boolean)) {
        a(((Boolean)localObject).booleanValue());
      }
      localObject = paramMap.get("DefaultEdgeRouter.polygonalRoutingEnabled");
    }
    if (!bool)
    {
      if ((localObject instanceof Boolean)) {
        this.e = ((Boolean)localObject).booleanValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.defaultMaxBonusDist");
    }
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        this.h = ((Number)localObject).doubleValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.defaultMinPolyDistance");
    }
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        this.i = ((Number)localObject).doubleValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.defaultMinLayerDistance");
    }
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        this.j = ((Number)localObject).doubleValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.defaultMinPolyDistance");
    }
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        this.i = ((Number)localObject).doubleValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.defaultMinimumSlope");
    }
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        this.g = ((Number)localObject).doubleValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.defaultMinimumFirstSegmentLength");
    }
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        this.k = ((Number)localObject).doubleValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.defaultMinimumLastSegmentLength");
    }
    if (!bool)
    {
      if ((localObject instanceof Number)) {
        this.l = ((Number)localObject).doubleValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.fromSketchMode");
    }
    if (!bool)
    {
      if ((localObject instanceof Boolean)) {
        this.n = ((Boolean)localObject).booleanValue();
      }
      localObject = paramMap.get("DefaultEdgeRouter.assignLaneToProxyNodes");
    }
    if ((localObject instanceof Boolean)) {
      this.p = ((Boolean)localObject).booleanValue();
    }
  }
  
  public void a(o paramo, ac paramac, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    this.z = new HashMap();
    b(paramo, paramac, parambc);
    Iterator localIterator = this.z.entrySet().iterator();
    break label112;
    label44:
    if (localIterator.hasNext()) {}
    label112:
    while (bool2)
    {
      Map.Entry localEntry = (Map.Entry)localIterator.next();
      a.c.d locald = (a.c.d)localEntry.getKey();
      a.c.z localz = (a.c.z)localEntry.getValue();
      zb localzb = paramo.e(locald);
      localzb.b();
      v localv = localz.f();
      if (localv == null) {
        break label44;
      }
      Point2D.Double localDouble = (Point2D.Double)localv.c();
      localzb.a(localDouble.x, localDouble.y);
      localv = localv.a();
      if ((bool2) || ((!bool2) && (bool1)) || ((!bool2) && (bool1))) {
        return;
      }
      if (!bool1) {
        break;
      }
    }
    this.z = null;
  }
  
  private static vc a(a.c.d paramd, e parame, bc parambc)
  {
    boolean bool = d.R;
    vc localvc1 = parambc.a(parame).n();
    ec localec = parambc.a(paramd.a(parame));
    if (!bool) {
      if (localec.d() == 2) {
        return localvc1;
      }
    }
    vc localvc2 = localec.n();
    if ((bool) || (localvc1 != null)) {
      if (bool) {}
    }
    return localvc1.equals(localvc2) ? localvc1 : null;
  }
  
  public void c(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    wc.a(paramo, false);
    this.u.clear();
    this.v.clear();
    this.w.clear();
    ArrayList localArrayList1 = new ArrayList(32);
    ArrayList localArrayList2 = new ArrayList(32);
    ArrayList localArrayList3 = new ArrayList(32);
    ArrayList localArrayList4 = new ArrayList(32);
    ArrayList localArrayList5 = new ArrayList(32);
    ArrayList localArrayList6 = new ArrayList(32);
    ArrayList localArrayList7 = new ArrayList(32);
    ArrayList localArrayList8 = new ArrayList(32);
    ArrayList localArrayList9 = new ArrayList(32);
    ArrayList localArrayList10 = new ArrayList(32);
    ArrayList localArrayList11 = new ArrayList(32);
    ArrayList localArrayList12 = new ArrayList(32);
    ArrayList localArrayList13 = new ArrayList(32);
    cc.s_ locals_ = new cc.s_(paramo, paramac, parambc);
    cc.n_ localn_ = new cc.n_(paramo, paramac, parambc);
    b_ localb_ = new b_(paramo);
    int i1 = 0;
    label224:
    label230:
    label368:
    label1022:
    do
    {
      do
      {
        if (i1 >= paramac.a()) {
          return;
        }
        vb localvb = paramac.a(i1);
        int i2 = 0;
        bb localbb = localvb.c();
        Object localObject1 = null;
        Object localObject2 = localbb.f();
        do
        {
          Object localObject3;
          do
          {
            if (localObject2 == null) {
              break label3293;
            }
            e locale;
            Object localObject5;
            Object localObject6;
            int i3;
            do
            {
              locale = (e)((v)localObject2).c();
              ec localec = parambc.a(locale);
              if (bool1) {
                break label224;
              }
              if (localec.d() != 0)
              {
                if (bool2) {
                  break label368;
                }
                if (localec.d() != 12)
                {
                  if (bool2) {
                    break label368;
                  }
                  if (localec.d() != 13)
                  {
                    if (bool2) {
                      break label3290;
                    }
                    if (localec.d() != 15) {
                      break label3278;
                    }
                  }
                }
              }
              Object localObject4;
              if (!bool2)
              {
                if (localArrayList13.size() != 0)
                {
                  localObject3 = this.b.a(paramo, parambc, (e)localObject1, locale, localArrayList13);
                  if (bool2) {
                    break label537;
                  }
                  if (localObject3 != null)
                  {
                    this.w.add(paramrb.a(localvb, (Rectangle2D.Double)localObject3, (a.c.d[])localArrayList13.toArray(new a.c.d[localArrayList13.size()])));
                    localObject4 = localbb.g();
                    localbb.h((v)localObject4);
                    localbb.a((v)localObject4, (v)localObject2);
                  }
                }
                localb_.a = locale;
                localObject1 = locale;
                localArrayList13.clear();
                localArrayList5.clear();
                localArrayList7.clear();
                localArrayList6.clear();
                localArrayList8.clear();
                localArrayList9.clear();
                localArrayList11.clear();
                localArrayList10.clear();
              }
              else
              {
                localArrayList12.clear();
              }
              localObject3 = localec.b();
              do
              {
                if (localObject3 == null) {
                  break;
                }
                localObject4 = (a.c.d)((v)localObject3).c();
                localObject5 = ((a.c.d)localObject4).a(locale);
                localObject6 = parambc.a((a.c.d)localObject4);
                zb localzb = paramo.e(localObject4);
                int i4 = parambc.a((e)localObject5).i() - localec.i();
                if (bool2) {
                  break label1062;
                }
                if (bool1) {
                  break label1059;
                }
                int i5 = ((a.c.d)localObject4).e() == locale ? 1 : 0;
                cd localcd;
                if (i5 != 0)
                {
                  localcd = ((y)localObject6).d();
                  if (bool2) {
                    break label684;
                  }
                  if (!bool1) {}
                }
                else
                {
                  localcd = ((y)localObject6).f();
                }
                if ((bool2) || (parambc.a((a.c.d)localObject4).a() == 4))
                {
                  if (bool2) {
                    continue;
                  }
                  if (i4 > 0)
                  {
                    localArrayList13.add(localObject4);
                    if (bool2) {
                      continue;
                    }
                    if (!bool1) {}
                  }
                }
                else
                {
                  localzb.b();
                  if (bool2) {
                    continue;
                  }
                  if (localcd != null)
                  {
                    if (bool2) {
                      continue;
                    }
                    if (!localcd.c())
                    {
                      if (bool2) {
                        continue;
                      }
                      if (!localcd.d())
                      {
                        if (bool2) {
                          continue;
                        }
                        if (!localcd.g())
                        {
                          if (!bool2) {
                            if (localcd.e())
                            {
                              if (!bool2) {
                                if (i4 < 0)
                                {
                                  if (!bool2)
                                  {
                                    if (((y)localObject6).l())
                                    {
                                      localArrayList6.add(localObject4);
                                      if (bool2) {
                                        continue;
                                      }
                                      if (!bool1) {
                                        break label1022;
                                      }
                                    }
                                    localArrayList10.add(localObject4);
                                  }
                                  if (bool2) {
                                    continue;
                                  }
                                  if (!bool1) {
                                    break label1022;
                                  }
                                }
                              }
                              if (!bool2)
                              {
                                if (((y)localObject6).l())
                                {
                                  localArrayList8.add(localObject4);
                                  if (bool2) {
                                    continue;
                                  }
                                  if (!bool1) {
                                    break label1022;
                                  }
                                }
                                localArrayList12.add(localObject4);
                              }
                              if (bool2) {
                                continue;
                              }
                              if (!bool1) {
                                break label1022;
                              }
                            }
                          }
                          if (!bool2) {
                            if (i4 > 0)
                            {
                              if (!bool2)
                              {
                                if (((y)localObject6).l())
                                {
                                  localArrayList5.add(localObject4);
                                  if (bool2) {
                                    continue;
                                  }
                                  if (!bool1) {
                                    break label1022;
                                  }
                                }
                                localArrayList9.add(localObject4);
                              }
                              if (bool2) {
                                continue;
                              }
                              if (!bool1) {
                                break label1022;
                              }
                            }
                          }
                          if (!bool2) {
                            if (((y)localObject6).l())
                            {
                              localArrayList7.add(localObject4);
                              if (bool2) {
                                continue;
                              }
                              if (!bool1) {
                                break label1022;
                              }
                            }
                          }
                          localArrayList11.add(localObject4);
                        }
                      }
                    }
                  }
                }
                localObject3 = ((v)localObject3).a();
              } while (!bool1);
              localArrayList1.clear();
              localArrayList2.clear();
              localObject3 = localObject2;
              if (!bool2)
              {
                localObject4 = locale.i();
                do
                {
                  do
                  {
                    if (localObject4 == null) {
                      break label1195;
                    }
                    localObject5 = parambc.a((a.c.d)localObject4);
                    if (bool2) {
                      break;
                    }
                    if (bool1) {
                      break label275;
                    }
                    if (((y)localObject5).f() != null)
                    {
                      if (bool2) {
                        continue;
                      }
                      if (!((y)localObject5).f().c())
                      {
                        if (!bool2) {
                          if (((y)localObject5).f().f())
                          {
                            localArrayList1.add(localObject4);
                            if (bool2) {
                              continue;
                            }
                            if (!bool1) {
                              break label1183;
                            }
                          }
                        }
                        if (bool2) {
                          continue;
                        }
                        if (((y)localObject5).f().e()) {
                          localArrayList2.add(localObject4);
                        }
                      }
                    }
                    localObject4 = ((a.c.d)localObject4).j();
                  } while (!bool1);
                  localArrayList3.clear();
                  localArrayList4.clear();
                } while (bool2);
                localObject4 = locale.h();
                do
                {
                  if (localObject4 == null) {
                    break label1347;
                  }
                  localObject5 = parambc.a((a.c.d)localObject4);
                  if (bool1) {
                    break;
                  }
                  if (((y)localObject5).d() != null)
                  {
                    if (bool2) {
                      continue;
                    }
                    if (!((y)localObject5).d().d())
                    {
                      if (!bool2) {
                        if (((y)localObject5).d().f())
                        {
                          localArrayList3.add(localObject4);
                          if (bool2) {
                            continue;
                          }
                          if (!bool1) {
                            break label1335;
                          }
                        }
                      }
                      if (bool2) {
                        continue;
                      }
                      if (((y)localObject5).d().e()) {
                        localArrayList4.add(localObject4);
                      }
                    }
                  }
                  localObject4 = ((a.c.d)localObject4).i();
                } while (!bool1);
                if (bool2) {
                  break label1519;
                }
                if (bool2) {
                  break;
                }
                if (localArrayList11.size() > 0)
                {
                  l.a(localArrayList11, localb_);
                  i3 = localArrayList11.size() - 1;
                  do
                  {
                    if (i3 < 0) {
                      break;
                    }
                    localObject5 = (a.c.d)localArrayList11.get(i3);
                    if (bool1) {
                      break label1524;
                    }
                    if (this.p)
                    {
                      this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5, a((a.c.d)localObject5, locale, parambc)));
                      if ((!bool2) && (!bool1)) {}
                    }
                    else
                    {
                      this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5));
                    }
                    localObject6 = localbb.g();
                    localbb.h((v)localObject6);
                    localbb.a((v)localObject6, (v)localObject2);
                    i3--;
                  } while (!bool1);
                }
              }
              if (!bool2)
              {
                if (localArrayList3.size() > 0)
                {
                  l.a(localArrayList3, localn_);
                  i3 = 0;
                  do
                  {
                    if (i3 >= localArrayList3.size()) {
                      break;
                    }
                    localObject5 = (a.c.d)localArrayList3.get(i3);
                    if (bool1) {
                      break label1677;
                    }
                    if (this.p)
                    {
                      this.u.add(paramrb.a((a.c.d)localObject5, true, a((a.c.d)localObject5, locale, parambc)));
                      if ((!bool2) && (!bool1)) {}
                    }
                    else
                    {
                      this.u.add(paramrb.a((a.c.d)localObject5, true));
                    }
                    localObject6 = localbb.g();
                    localbb.h((v)localObject6);
                    localbb.a((v)localObject6, (v)localObject2);
                    i3++;
                  } while (!bool1);
                }
                if (bool2) {}
              }
              else if (localArrayList9.size() > 0)
              {
                l.a(localArrayList9, localb_);
                i3 = localArrayList9.size() - 1;
                do
                {
                  if (i3 < 0) {
                    break;
                  }
                  localObject5 = (a.c.d)localArrayList9.get(i3);
                  if (bool1) {
                    break label1837;
                  }
                  if (this.p)
                  {
                    this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5, a((a.c.d)localObject5, locale, parambc)));
                    if ((!bool2) && (!bool1)) {}
                  }
                  else
                  {
                    this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5));
                  }
                  localObject6 = localbb.g();
                  localbb.h((v)localObject6);
                  localbb.a((v)localObject6, (v)localObject2);
                  i3--;
                } while (!bool1);
              }
              if (!bool2) {
                if (localArrayList7.size() > 0)
                {
                  l.a(localArrayList7, localb_);
                  i3 = 0;
                  do
                  {
                    if (i3 >= localArrayList7.size()) {
                      break;
                    }
                    localObject5 = (a.c.d)localArrayList7.get(i3);
                    if (bool1) {
                      break label1996;
                    }
                    if (this.p)
                    {
                      this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5, a((a.c.d)localObject5, locale, parambc)));
                      if ((!bool2) && (!bool1)) {}
                    }
                    else
                    {
                      this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5));
                    }
                    localObject6 = localbb.g();
                    localbb.h((v)localObject6);
                    localbb.a((v)localObject6, (v)localObject2);
                    i3++;
                  } while (!bool1);
                }
              }
              if (!bool2)
              {
                if (localArrayList1.size() > 0)
                {
                  l.a(localArrayList1, locals_);
                  i3 = 0;
                  do
                  {
                    if (i3 >= localArrayList1.size()) {
                      break;
                    }
                    localObject5 = (a.c.d)localArrayList1.get(i3);
                    if (bool1) {
                      break label2149;
                    }
                    if (this.p)
                    {
                      this.u.add(paramrb.a((a.c.d)localObject5, false, a((a.c.d)localObject5, locale, parambc)));
                      if ((!bool2) && (!bool1)) {}
                    }
                    else
                    {
                      this.u.add(paramrb.a((a.c.d)localObject5, false));
                    }
                    localObject6 = localbb.g();
                    localbb.h((v)localObject6);
                    localbb.a((v)localObject6, (v)localObject2);
                    i3++;
                  } while (!bool1);
                }
                if (bool2) {}
              }
              else
              {
                if (localArrayList5.size() > 0)
                {
                  l.a(localArrayList5, localb_);
                  i3 = 0;
                  do
                  {
                    if (i3 >= localArrayList5.size()) {
                      break;
                    }
                    localObject5 = (a.c.d)localArrayList5.get(i3);
                    if (bool1) {
                      break label2308;
                    }
                    if (this.p)
                    {
                      this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5, a((a.c.d)localObject5, locale, parambc)));
                      if ((!bool2) && (!bool1)) {}
                    }
                    else
                    {
                      this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5));
                    }
                    localObject6 = localbb.g();
                    localbb.h((v)localObject6);
                    localbb.a((v)localObject6, (v)localObject2);
                    i3++;
                  } while (!bool1);
                }
                if (bool2) {
                  break label2462;
                }
              }
              if (localArrayList6.size() > 0)
              {
                l.a(localArrayList6, localb_);
                i3 = localArrayList6.size() - 1;
                do
                {
                  if (i3 < 0) {
                    break;
                  }
                  localObject5 = (a.c.d)localArrayList6.get(i3);
                  if (bool1) {
                    break label2472;
                  }
                  if (this.p)
                  {
                    this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5, a((a.c.d)localObject5, locale, parambc)));
                    if ((!bool2) && (!bool1)) {}
                  }
                  else
                  {
                    this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5));
                  }
                  localObject6 = localbb.g();
                  localbb.h((v)localObject6);
                  localbb.b((v)localObject6, (v)localObject3);
                  localObject3 = localObject6;
                  i3--;
                } while (!bool1);
              }
              if (!bool2) {
                if (localArrayList2.size() > 0)
                {
                  l.a(localArrayList2, locals_);
                  i3 = 0;
                  do
                  {
                    if (i3 >= localArrayList2.size()) {
                      break;
                    }
                    localObject5 = (a.c.d)localArrayList2.get(i3);
                    if (bool1) {
                      break label2629;
                    }
                    if (this.p)
                    {
                      this.u.add(paramrb.a((a.c.d)localObject5, false, a((a.c.d)localObject5, locale, parambc)));
                      if ((!bool2) && (!bool1)) {}
                    }
                    else
                    {
                      this.u.add(paramrb.a((a.c.d)localObject5, false));
                    }
                    localObject6 = localbb.g();
                    localbb.h((v)localObject6);
                    localbb.b((v)localObject6, (v)localObject3);
                    localObject3 = localObject6;
                    i3++;
                  } while (!bool1);
                }
              }
              if (!bool2)
              {
                if (localArrayList8.size() > 0)
                {
                  l.a(localArrayList8, localb_);
                  i3 = localArrayList8.size() - 1;
                  do
                  {
                    if (i3 < 0) {
                      break;
                    }
                    localObject5 = (a.c.d)localArrayList8.get(i3);
                    if (bool1) {
                      break label2793;
                    }
                    if (this.p)
                    {
                      this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5, a((a.c.d)localObject5, locale, parambc)));
                      if ((!bool2) && (!bool1)) {}
                    }
                    else
                    {
                      this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5));
                    }
                    localObject6 = localbb.g();
                    localbb.h((v)localObject6);
                    localbb.b((v)localObject6, (v)localObject3);
                    localObject3 = localObject6;
                    i3--;
                  } while (!bool1);
                }
                if (bool2) {}
              }
              else if (localArrayList10.size() > 0)
              {
                l.a(localArrayList10, localb_);
                i3 = 0;
                do
                {
                  if (i3 >= localArrayList10.size()) {
                    break;
                  }
                  localObject5 = (a.c.d)localArrayList10.get(i3);
                  if (bool1) {
                    break label2956;
                  }
                  if (this.p)
                  {
                    this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5, a((a.c.d)localObject5, locale, parambc)));
                    if ((!bool2) && (!bool1)) {}
                  }
                  else
                  {
                    this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5));
                  }
                  localObject6 = localbb.g();
                  localbb.h((v)localObject6);
                  localbb.b((v)localObject6, (v)localObject3);
                  localObject3 = localObject6;
                  i3++;
                } while (!bool1);
              }
              if (bool2) {
                break label3108;
              }
              if (localArrayList4.size() > 0)
              {
                l.a(localArrayList4, localn_);
                i3 = 0;
                do
                {
                  if (i3 >= localArrayList4.size()) {
                    break;
                  }
                  localObject5 = (a.c.d)localArrayList4.get(i3);
                  if (bool1) {
                    break label3113;
                  }
                  if (this.p)
                  {
                    this.u.add(paramrb.a((a.c.d)localObject5, true, a((a.c.d)localObject5, locale, parambc)));
                    if ((!bool2) && (!bool1)) {}
                  }
                  else
                  {
                    this.u.add(paramrb.a((a.c.d)localObject5, true));
                  }
                  localObject6 = localbb.g();
                  localbb.h((v)localObject6);
                  localbb.b((v)localObject6, (v)localObject3);
                  localObject3 = localObject6;
                  i3++;
                } while (!bool1);
              }
            } while (bool2);
            if (localArrayList12.size() > 0)
            {
              l.a(localArrayList12, localb_);
              i3 = 0;
              do
              {
                if (i3 >= localArrayList12.size()) {
                  break label3269;
                }
                localObject5 = (a.c.d)localArrayList12.get(i3);
                if (bool2) {
                  break label230;
                }
                if (bool1) {
                  break;
                }
                if (this.p)
                {
                  this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5, a((a.c.d)localObject5, locale, parambc)));
                  if ((!bool2) && (!bool1)) {}
                }
                else
                {
                  this.v.add(paramrb.a(localvb, locale, (a.c.d)localObject5));
                }
                localObject6 = localbb.g();
                localbb.h((v)localObject6);
                localbb.b((v)localObject6, (v)localObject3);
                localObject3 = localObject6;
                i3++;
              } while (!bool1);
            }
          } while (bool2);
          localObject2 = localObject3;
          localObject2 = ((v)localObject2).a();
          i2++;
        } while (!bool1);
        i1++;
      } while (bool2);
    } while (!bool1);
    label275:
    label537:
    label684:
    label1335:
    label1347:
    label1519:
    label1524:
    return;
  }
  
  public void d(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    if (i1 < this.u.size()) {}
    while (bool2)
    {
      e locale = (e)this.u.get(i1);
      paramrb.c(locale);
      i1++;
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool1) {
        break;
      }
    }
    this.u.clear();
  }
  
  public void e(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    if (i1 < this.v.size()) {}
    label391:
    label459:
    label473:
    while (bool2)
    {
      e locale1 = (e)this.v.get(i1);
      ec localec1 = parambc.a(locale1);
      e locale2 = localec1.f();
      a.c.d locald = localec1.g();
      ec localec2 = parambc.a(locale2);
      zc localzc = paramo.d(locale2);
      if (bool1) {
        return;
      }
      cd localcd = locale2 == locald.e() ? parambc.a(locald).d() : parambc.a(locald).f();
      if (!bool2)
      {
        if (localcd != null)
        {
          if (!bool2) {
            if (!localcd.e())
            {
              if (bool2) {
                break label473;
              }
              if (!localcd.f()) {
                break label459;
              }
            }
          }
          if (bool2) {
            break label473;
          }
          if (parambc.a(locale2).d() == 0)
          {
            a.d.w localw = paramo.r(locale1);
            f localf1 = localec2.a(0, localzc);
            f localf2 = localec2.a(2, localzc);
            double d1 = localw.a - localzc.a();
            if (!bool2)
            {
              if (localw.a > localzc.a())
              {
                d2 = localzc.c();
                if (!bool2) {}
                double d3 = Math.abs(d2 - d1) > 0.0001D ? d1 : d2;
                if (!bool2) {
                  if (localf1 != null) {
                    localf1.a(d2, d3, localw.b - localzc.b());
                  }
                }
                if ((!bool2) && (localf2 == null)) {
                  break label459;
                }
                localf2.b(d2, d3, localw.b - localzc.b());
                if (bool2) {
                  break label473;
                }
                if (!bool1) {
                  break label459;
                }
              }
              if (bool2) {
                break label391;
              }
            }
            double d2 = Math.abs(d1) > 0.0001D ? d1 : 0.0D;
            if (!bool2) {
              if (localf1 != null) {
                localf1.a(d2, 0.0D, localw.b - localzc.b());
              }
            }
            if ((bool2) || (localf2 != null)) {
              localf2.b(d2, 0.0D, localw.b - localzc.b());
            }
          }
        }
        paramrb.d(locale1);
        i1++;
      }
      if (!bool1) {
        break;
      }
    }
    this.v.clear();
  }
  
  public void g(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    if (i1 < this.w.size()) {}
    while (bool2)
    {
      e locale = (e)this.w.get(i1);
      paramrb.e(locale);
      i1++;
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool1) {
        break;
      }
    }
    this.w.clear();
  }
  
  public void a(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    this.x = new ArrayList(62);
    this.y = new ArrayList(62);
    int i1 = 0;
    label230:
    do
    {
      do
      {
        if (i1 >= paramac.a()) {
          break;
        }
        vb localvb = paramac.a(i1);
        v localv = localvb.c().f();
        do
        {
          if (localv == null) {
            break label335;
          }
          e locale = (e)localv.c();
          int i2 = parambc.a(locale).d();
          if (bool1) {
            break;
          }
          if ((i2 == 0) || (i2 == 15))
          {
            Object localObject = locale.k();
            a.c.d locald;
            y localy;
            ec localec;
            do
            {
              do
              {
                if (localObject == null) {
                  break label230;
                }
                locald = ((a.c.d)localObject).l();
                localy = parambc.a((a.c.d)localObject);
                localec = parambc.a(((a.c.d)localObject).e());
                if (bool1) {
                  break;
                }
                if (localec.h() == i1)
                {
                  a(paramo, localvb, localy, paramrb, locale, (a.c.d)localObject);
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {}
                }
                else
                {
                  c(paramo, localvb, localy, paramrb, locale, (a.c.d)localObject);
                }
                localObject = locald;
              } while (!bool1);
            } while (bool2);
            localObject = locale.j();
            do
            {
              if (localObject == null) {
                break label318;
              }
              locald = ((a.c.d)localObject).k();
              localy = parambc.a((a.c.d)localObject);
              localec = parambc.a(((a.c.d)localObject).f());
              if (bool1) {
                break;
              }
              if (localec.h() != i1) {
                c(paramo, localvb, localy, paramrb, locale, (a.c.d)localObject);
              }
              localObject = locald;
            } while (!bool1);
          }
          localv = localv.a();
          if (bool2) {
            break label340;
          }
        } while (!bool1);
        i1++;
      } while (bool2);
    } while (!bool1);
    label318:
    label335:
    label340:
    return;
  }
  
  public void a(o paramo, vb paramvb, y paramy, rb paramrb, e parame, a.c.d paramd)
  {
    boolean bool = d.R;
    cd localcd1 = paramy.d();
    cd localcd2 = paramy.f();
    if (((bool) || (localcd1 != null)) && ((bool) || (localcd2 != null)) && (((!bool) && ((localcd1.d()) && ((!bool) && (localcd2.c())))) || (((bool) || (localcd1.c())) && ((bool) || (localcd2.d()))))) {
      this.y.add(paramrb.b(paramvb, paramd));
    }
  }
  
  public void c(o paramo, vb paramvb, y paramy, rb paramrb, e parame, a.c.d paramd)
  {
    boolean bool = d.R;
    a.c.d locald;
    if (parame == paramd.f())
    {
      if (((bool) || (paramy.f() != null)) && (paramy.f().d()))
      {
        locald = paramrb.a(paramvb, paramd, parame);
        this.x.add(locald);
        if (!d.Q) {}
      }
    }
    else if (((bool) || (paramy.d() != null)) && (paramy.d().c()))
    {
      locald = paramrb.a(paramvb, paramd, parame);
      this.x.add(locald);
    }
  }
  
  public void b(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = 0;
    Object localObject;
    do
    {
      do
      {
        if (i1 >= this.x.size()) {
          break;
        }
        localObject = (a.c.d)this.x.get(i1);
        paramrb.c((a.c.d)localObject);
        i1++;
        if (bool2) {
          break label81;
        }
        if (bool1) {
          break label79;
        }
      } while (!bool1);
    } while (bool2);
    i1 = 0;
    label79:
    label81:
    if (i1 < this.y.size()) {}
    do
    {
      localObject = (e)this.y.get(i1);
      paramrb.f((e)localObject);
      i1++;
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool1) {
        break;
      }
      this.y.clear();
      this.y = null;
      this.x.clear();
    } while (bool2);
    this.x = null;
  }
  
  private boolean a(vb paramvb1, vb paramvb2)
  {
    boolean bool = d.R;
    pc localpc1 = paramvb1.f();
    pc localpc2 = paramvb2.f();
    if (!bool) {
      if (localpc1 != null)
      {
        if (bool) {
          break label52;
        }
        if (localpc2 != null) {
          return localpc1 != localpc2;
        }
      }
    }
    label52:
    if (!bool) {
      if (localpc1 == null)
      {
        if (bool) {
          break label73;
        }
        if (localpc2 == null) {
          return false;
        }
      }
    }
    label73:
    return ((!bool) && ((localpc1 == null) && ((!bool) && (localpc2 != this.B)))) || (((bool) || (localpc2 == null)) && (localpc1 != this.B));
  }
  
  private a.c.z a(pc parampc1, pc parampc2, o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    kc localkc = kc.d(paramo);
    a.c.z localz = new a.c.z();
    if ((localkc != null) && ((bool2) || ((parampc1 != null) || ((bool2) || (parampc2 != null)))))
    {
      if (!bool2) {
        if (parampc1 == null)
        {
          i1 = parampc2.a();
          i2 = 0;
          do
          {
            if (i2 >= i1) {
              break;
            }
            if (bool1) {
              break label226;
            }
            localz.b(localkc.c(i2));
            i2++;
          } while (!bool1);
        }
      }
      if (!bool2) {
        if (parampc2 == null)
        {
          i1 = parampc1.a();
          i2 = i1 + 1;
          do
          {
            if (i2 >= localkc.e().size()) {
              break;
            }
            if (bool1) {
              break label226;
            }
            localz.b(localkc.c(i2));
            i2++;
          } while (!bool1);
        }
      }
      int i1 = Math.min(parampc1.a(), parampc2.a());
      int i2 = Math.max(parampc1.a(), parampc2.a());
      int i3 = i1 + 1;
      do
      {
        if (i3 >= i2) {
          break;
        }
        if (bool1) {
          break label226;
        }
        localz.b(localkc.c(i3));
        i3++;
      } while (!bool1);
    }
    label226:
    return localz;
  }
  
  private void a(pc parampc, o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.z localz = a(null, parampc, paramo);
    if ((bool2) || (!localz.isEmpty()))
    {
      localz.j();
      double d1 = parampc.h();
      a.c.y localy = localz.h();
      do
      {
        if (!localy.e()) {
          break;
        }
        pc localpc = (pc)localy.j();
        d1 -= localpc.b();
        localpc.g(d1);
        localpc.d(localpc.b());
        localy.f();
      } while (!bool1);
    }
  }
  
  private void c(pc parampc, o paramo)
  {
    boolean bool = d.Q;
    a.c.z localz = a(parampc, null, paramo);
    if (!localz.isEmpty())
    {
      double d1 = parampc.h() + parampc.e();
      a.c.y localy = localz.h();
      do
      {
        if (!localy.e()) {
          break;
        }
        pc localpc = (pc)localy.j();
        localpc.g(d1);
        localpc.d(localpc.b());
        d1 += localpc.e();
        localy.f();
      } while (!bool);
    }
  }
  
  private double b(pc parampc1, pc parampc2, o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    double d1 = parampc1.h() + parampc1.e();
    a.c.z localz = a(parampc1, parampc2, paramo);
    a.c.y localy = localz.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      pc localpc = (pc)localy.j();
      localpc.g(d1);
      localpc.d(localpc.b());
      if (!bool2)
      {
        if (bool1) {
          break label110;
        }
        d1 += localpc.e();
        localy.f();
      }
    } while (!bool1);
    label110:
    return d1;
  }
  
  private double c(pc parampc1, pc parampc2, o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    double d1 = 0.0D;
    a.c.z localz = a(parampc1, parampc2, paramo);
    if ((bool2) || (!localz.isEmpty()))
    {
      a.c.y localy = localz.h();
      do
      {
        if (!localy.e()) {
          break;
        }
        pc localpc = (pc)localy.j();
        if (!bool2)
        {
          if (bool1) {
            break label98;
          }
          d1 += localpc.b();
          localy.f();
        }
      } while (!bool1);
    }
    label98:
    return d1;
  }
  
  private boolean a(o paramo, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (parambc == null) {
      return false;
    }
    m localm = paramo.w();
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        y localy = parambc.a(localm.a());
        if (((bool2) || (localy != null)) && ((bool2) || (localy.m() != null)))
        {
          if (bool2) {
            continue;
          }
          if (localy.m().i().b() == 2) {}
        }
        else
        {
          return false;
        }
        localm.f();
      } while (!bool1);
    } while (bool2);
    return true;
  }
  
  private void b(o paramo, ac paramac, bc parambc)
  {
    boolean bool14 = d.R;
    boolean bool13 = d.Q;
    ArrayList localArrayList = new ArrayList(120);
    double d1 = 0.0D;
    kb localkb = new kb();
    long l1 = System.currentTimeMillis();
    if (!bool14) {}
    long l2 = this.t == 9223372036854775807L ? 9223372036854775807L : this.t / paramac.a();
    localkb.a(l2);
    if (!bool14) {
      if (this.t < 10L)
      {
        localkb.a(0);
        localkb.b(0);
        localkb.d(0);
        if (!bool14) {
          if (!bool13) {
            break label146;
          }
        }
      }
      else
      {
        localkb.a(2147483647);
        localkb.b(2147483647);
      }
    }
    localkb.d(2147483647);
    label146:
    if ((bool14) || (this.s != null))
    {
      localObject1 = this.s.get("ChannelRouter.maximalConstraintSimplexDuration");
      if (!bool14)
      {
        if ((localObject1 instanceof Number)) {
          localkb.a(((Number)localObject1).longValue());
        }
        localObject1 = this.s.get("ChannelRouter.segmentMisgraphEdgeLimit");
      }
      if (!bool14)
      {
        if ((localObject1 instanceof Number)) {
          localkb.a(((Number)localObject1).intValue());
        }
        localObject1 = this.s.get("ChannelRouter.maxConstraintsCount");
      }
      if (!bool14)
      {
        if ((localObject1 instanceof Number)) {
          localkb.d(((Number)localObject1).intValue());
        }
        localObject1 = this.s.get("ChannelRouter.segmentMisGraphLimit");
      }
      if ((localObject1 instanceof Number)) {
        localkb.b(((Number)localObject1).intValue());
      }
    }
    Object localObject1 = new HashMap();
    Object localObject2 = this.w.iterator();
    break label367;
    label329:
    if (((Iterator)localObject2).hasNext()) {}
    label367:
    Object localObject3;
    while (bool14)
    {
      e locale1 = (e)((Iterator)localObject2).next();
      d.rb_ localrb_ = (d.rb_)parambc.a(locale1);
      int i2 = 0;
      if (i2 >= localrb_.x.length) {
        break label329;
      }
      localObject3 = localrb_.x[i2];
      ((HashMap)localObject1).put(localObject3, locale1);
      i2++;
      if ((bool14) || ((!bool14) && (bool13)) || ((!bool14) && (bool13))) {
        break label442;
      }
      if (!bool13) {
        break;
      }
    }
    localkb.c(0.0D);
    label442:
    localObject2 = new f(-1.797693134862316E+308D, 1.7976931348623157E+308D, -1.797693134862316E+308D);
    boolean bool1 = a(paramo, parambc);
    int i1 = 0;
    label664:
    label857:
    label3580:
    label5502:
    do
    {
      if (i1 >= paramac.a()) {
        break;
      }
      vb localvb1 = paramac.a(i1);
      localObject3 = localvb1.c();
      f localf = new f(-1.797693134862316E+308D, 1.7976931348623157E+308D, 1.7976931348623157E+308D);
      double d2 = -1.797693134862316E+308D;
      Object localObject4;
      double d3;
      double d5;
      vb localvb3;
      double d6;
      double d7;
      e locale4;
      Object localObject10;
      Object localObject12;
      Object localObject8;
      double d47;
      Object localObject26;
      a.c.d locald9;
      double d25;
      do
      {
        v localv1 = ((bb)localObject3).g();
        do
        {
          if (localv1 == null) {
            break;
          }
          e locale2 = (e)localv1.c();
          localObject4 = paramo.d(locale2);
          ((zc)localObject4).a(((zc)localObject4).a(), ((zc)localObject4).b() + d1);
          if (bool13) {
            break label664;
          }
          if (i1 == 0) {
            a(paramo, parambc, localf, locale2, (zc)localObject4, 0.0D, true);
          }
          a(paramo, parambc, (f)localObject2, locale2, (zc)localObject4, 0.0D, false);
          d2 = Math.max(d2, ((zc)localObject4).b() + ((zc)localObject4).d());
          localv1 = localv1.b();
        } while (!bool13);
        localkb.c((f)localObject2);
        if (!bool14)
        {
          if (i1 == 0)
          {
            localkb.a(localf);
            this.b.a(paramo, localkb, localvb1, parambc, true, d1);
            this.c.a(localkb, localvb1, true, d1);
            this.A = localvb1.f();
            if (!bool14)
            {
              if (this.A != null) {
                localkb.a(this.A, 0.0D, 0.0D, this.A.c(), -1.797693134862316E+308D, false, 1.7976931348623157E+308D, false);
              }
              localkb.u();
              this.b.b(paramo, localkb, localvb1, parambc, true, 0.0D);
              this.b.a(paramo, (f)localObject2, localvb1, parambc, 0.0D, (Map)localObject1);
              this.c.c(localkb, localvb1, true, 0.0D);
              if (bool14) {
                break label857;
              }
            }
            if (this.A != null)
            {
              d3 = localkb.d(this.A);
              this.A.g(d3);
              a(this.A, paramo);
              this.B = this.A;
            }
          }
          localkb.b();
        }
        if (!bool14)
        {
          if (System.currentTimeMillis() - l1 > this.t)
          {
            localkb.a(100);
            localkb.b(20);
            localkb.d(500);
          }
          this.b.a(paramo, localkb, localvb1, parambc, false, d1);
          this.c.a(localkb, localvb1, false, d1);
        }
        d3 = ((f)localObject2).d();
        localkb.b(d3);
        localArrayList.clear();
        if (bool14) {
          break label9344;
        }
        if (i1 >= paramac.a() - 1) {
          break label9333;
        }
        localObject4 = paramac.a(i1 + 1);
        d5 = 0.0D;
        vb localvb2;
        if (i1 < paramac.a() - 2)
        {
          localvb2 = paramac.a(i1 + 2);
          if (bool14) {
            break label1024;
          }
          if (!bool13) {}
        }
        else
        {
          localvb2 = null;
        }
        if (!bool14) {
          if (!this.f)
          {
            if (bool14) {
              break label1065;
            }
            if (!bool1) {
              break label1058;
            }
          }
        }
        int i4;
        int i3 = i4 = 0;
        if ((bool14) || (bool13))
        {
          int i5 = ((vb)localObject4).d();
          if (!bool14)
          {
            if (i5 == 2)
            {
              i3 = 1;
              if ((bool14) || (localvb2 != null)) {
                if (bool14) {}
              }
              i4 = localvb2.d() == 3 ? 1 : 0;
              if (bool14) {
                break label1159;
              }
              if (!bool13) {
                break label1157;
              }
            }
            if (bool14) {}
          }
          else if (i5 == 3)
          {
            i3 = 0;
            i4 = 1;
            if (bool14) {
              break label1159;
            }
            if (!bool13) {
              break label1157;
            }
          }
          i3 = 0;
          i4 = 0;
          if (!bool14) {
            if (i3 != 0)
            {
              if (bool14) {
                break label1192;
              }
              if (i4 != 0)
              {
                i1 += 2;
                if ((!bool14) && (!bool13)) {
                  break label1208;
                }
              }
            }
          }
          if ((bool14) || ((i3 != 0) || (i4 != 0))) {
            i1++;
          }
        }
        localvb3 = paramac.a(i1 + 1);
        this.A = null;
        if ((bool14) || (a(localvb1, localvb3)))
        {
          this.A = localvb3.f();
          d6 = c(this.B, this.A, paramo);
          localObject5 = localkb.a(this.A, d6, this.B.d(), this.A.c(), -1.797693134862316E+308D, false, 1.7976931348623157E+308D, true);
          ((kb.g_)localObject5).p = (this.B.h() + this.B.b() + d6 * 0.5D);
          ((kb.g_)localObject5).n = ((kb.g_)localObject5).p;
        }
        d6 = 1.7976931348623157E+308D;
        Object localObject5 = new f(-1.797693134862316E+308D, 1.7976931348623157E+308D, 1.7976931348623157E+308D);
        v localv2 = localvb3.c().g();
        if (localv2 != null) {}
        while (bool14)
        {
          e locale3 = (e)localv2.c();
          localObject6 = paramo.d(localv2.c());
          if (bool14) {
            break label1479;
          }
          d6 = Math.min(d6, ((zc)localObject6).b() + d1);
          a(paramo, parambc, (f)localObject5, locale3, (zc)localObject6, d1, true);
          localv2 = localv2.b();
          if (bool13) {
            break label1466;
          }
          if (!bool13) {
            break;
          }
        }
        localkb.a((f)localObject5);
        d7 = -((f)localObject2).f((f)localObject5) + f();
        this.b.a(paramo, localkb, localvb3, parambc, true, d1);
        this.c.a(localkb, localvb3, true, d1);
        Object localObject9;
        Object localObject11;
        Object localObject18;
        if (!bool14)
        {
          if (i3 == 0)
          {
            if (bool14) {
              break label2592;
            }
            if (i4 == 0)
            {
              localObject6 = ((bb)localObject3).f();
              int i6;
              do
              {
                do
                {
                  if (localObject6 == null) {
                    break;
                  }
                  locale4 = (e)((v)localObject6).c();
                  if (bool14) {
                    break label8394;
                  }
                  if (bool13) {
                    break label8391;
                  }
                  if (locale4.h() != null)
                  {
                    i6 = parambc.a(locale4).d();
                    if (bool14) {
                      continue;
                    }
                    if (i6 != 12)
                    {
                      if (bool14) {
                        continue;
                      }
                      if (i6 != 13)
                      {
                        localObject9 = locale4.h();
                        do
                        {
                          if (localObject9 == null) {
                            break;
                          }
                          localObject10 = paramo.r((a.c.d)localObject9);
                          localObject11 = paramo.s((a.c.d)localObject9);
                          if (bool13) {
                            break label9266;
                          }
                          if (((a.d.w)localObject10).a != ((a.d.w)localObject11).a)
                          {
                            if (!bool14) {
                              if (d(parambc, (a.c.d)localObject9))
                              {
                                localArrayList.add(localObject9);
                                if (bool14) {
                                  break label1878;
                                }
                                if (!bool13) {
                                  break label1864;
                                }
                              }
                            }
                            double d21 = a(paramo, parambc, (a.c.d)localObject9);
                            z localz = parambc.a((a.c.d)localObject9).m();
                            localObject18 = localkb.a(localObject9, this.m, d21, ((a.d.w)localObject10).a, true, ((a.d.w)localObject11).a, false, b(parambc, (a.c.d)localObject9), localz.j());
                            if (!bool14) {
                              if (a(parambc.a(((a.c.d)localObject9).e())))
                              {
                                ((kb.g_)localObject18).p = (((a.d.w)localObject10).b + a(parambc, (a.c.d)localObject9, true));
                                ((kb.g_)localObject18).n = ((a.d.w)localObject10).b;
                              }
                            }
                            if (bool14) {
                              break label1878;
                            }
                            if (a(parambc.a(((a.c.d)localObject9).f())))
                            {
                              ((kb.g_)localObject18).q = (((a.d.w)localObject11).b + d1 - a(parambc, (a.c.d)localObject9, false));
                              ((kb.g_)localObject18).o = (((a.d.w)localObject11).b + d1);
                            }
                          }
                          if (!bool14)
                          {
                            if (a(parambc.a(((a.c.d)localObject9).e())))
                            {
                              if (bool14) {
                                continue;
                              }
                              if (a(parambc.a(((a.c.d)localObject9).f()))) {
                                d7 = a(paramo, parambc, (a.c.d)localObject9, ((a.d.w)localObject10).a, ((a.d.w)localObject10).b, ((a.d.w)localObject11).a, ((a.d.w)localObject11).b + d1, d1, d7);
                              }
                            }
                            localObject9 = ((a.c.d)localObject9).i();
                          }
                        } while (!bool13);
                      }
                    }
                  }
                  localObject6 = ((v)localObject6).a();
                  if (bool14) {
                    break label9266;
                  }
                } while (!bool13);
                d5 += a(paramo, parambc, localvb1, d2, localvb3, d6, localkb, localArrayList, d1, d7);
              } while (bool14);
              localObject6 = ((bb)localObject3).f();
              do
              {
                if (localObject6 == null) {
                  break label9257;
                }
                locale4 = (e)((v)localObject6).c();
                if (bool14) {
                  break label8394;
                }
                if (bool13) {
                  break;
                }
                if (locale4.h() != null)
                {
                  i6 = parambc.a(locale4).d();
                  if (bool14) {
                    continue;
                  }
                  if (i6 != 12)
                  {
                    if (bool14) {
                      continue;
                    }
                    if (i6 != 13)
                    {
                      localObject9 = locale4.h();
                      do
                      {
                        if (localObject9 == null) {
                          break;
                        }
                        localObject10 = paramo.r((a.c.d)localObject9);
                        localObject11 = paramo.s((a.c.d)localObject9);
                        if (bool13) {
                          break label9266;
                        }
                        if (((a.d.w)localObject10).a != ((a.d.w)localObject11).a)
                        {
                          if (bool14) {
                            continue;
                          }
                          if (!d(parambc, (a.c.d)localObject9))
                          {
                            localObject12 = a((a.c.d)localObject9);
                            if (b(parambc, (a.c.d)localObject9))
                            {
                              kb.g_ localg_1 = localkb.a(localObject9);
                              if (bool14) {
                                continue;
                              }
                              if (!Double.isNaN(localg_1.h)) {
                                if (!bool14)
                                {
                                  if (localg_1.a() == 1)
                                  {
                                    ((a.c.z)localObject12).add(new Point2D.Double(((a.d.w)localObject10).a, localg_1.h - (((a.d.w)localObject10).a - localg_1.v)));
                                    if (!bool14)
                                    {
                                      if (localg_1.u != localg_1.v)
                                      {
                                        ((a.c.z)localObject12).add(new Point2D.Double(localg_1.v, localg_1.h));
                                        ((a.c.z)localObject12).add(new Point2D.Double(localg_1.u, localg_1.h));
                                      }
                                      ((a.c.z)localObject12).add(new Point2D.Double(((a.d.w)localObject11).a, localg_1.h + (localg_1.u - ((a.d.w)localObject11).a)));
                                    }
                                    if (bool14) {
                                      continue;
                                    }
                                    if (!bool13) {}
                                  }
                                  else
                                  {
                                    ((a.c.z)localObject12).add(new Point2D.Double(((a.d.w)localObject10).a, localg_1.h - (localg_1.u - ((a.d.w)localObject10).a)));
                                  }
                                }
                                else
                                {
                                  if (!bool14)
                                  {
                                    if (localg_1.u != localg_1.v)
                                    {
                                      ((a.c.z)localObject12).add(new Point2D.Double(localg_1.u, localg_1.h));
                                      ((a.c.z)localObject12).add(new Point2D.Double(localg_1.v, localg_1.h));
                                    }
                                    ((a.c.z)localObject12).add(new Point2D.Double(((a.d.w)localObject11).a, localg_1.h + (((a.d.w)localObject11).a - localg_1.v)));
                                  }
                                  if (bool14) {
                                    continue;
                                  }
                                  if (!bool13) {}
                                }
                              }
                            }
                            else
                            {
                              double d22 = localkb.d(localObject9);
                              if (bool14) {
                                continue;
                              }
                              if (!Double.isNaN(d22))
                              {
                                ((a.c.z)localObject12).add(new Point2D.Double(((a.d.w)localObject10).a, d22));
                                ((a.c.z)localObject12).add(new Point2D.Double(((a.d.w)localObject11).a, d22));
                              }
                            }
                          }
                        }
                        localObject9 = ((a.c.d)localObject9).i();
                      } while (!bool13);
                    }
                  }
                }
                localObject6 = ((v)localObject6).a();
                if (bool14) {
                  break label9266;
                }
              } while (!bool13);
            }
          }
          if (bool14) {
            break label9534;
          }
        }
        Object localObject25;
        double d44;
        double d34;
        a.c.d locald7;
        if (!bool14)
        {
          if (i3 != 0)
          {
            if (bool14) {
              break label5715;
            }
            if (i4 != 0)
            {
              localObject6 = ((vb)localObject4).c().f();
              Object localObject7;
              double d9;
              double d14;
              double d23;
              Object localObject21;
              boolean bool12;
              double d54;
              kb.g_ localg_8;
              do
              {
                do
                {
                  if (localObject6 == null) {
                    break;
                  }
                  locale4 = (e)((v)localObject6).c();
                  if (bool13) {
                    break label9266;
                  }
                  if (!this.c.h(locale4))
                  {
                    localObject7 = a(locale4, parambc);
                    Object localObject27;
                    if (localObject7 == null)
                    {
                      localObject9 = locale4.h().f();
                      localObject10 = a((e)localObject9, parambc);
                      if (bool14) {
                        break label3580;
                      }
                      if (localObject10 == null)
                      {
                        localObject11 = locale4.i();
                        localObject12 = paramo.r((a.c.d)localObject11);
                        a.d.w localw1 = paramo.s(((e)localObject9).h());
                        if (!bool14) {
                          if (((a.d.w)localObject12).a != localw1.a)
                          {
                            if (!bool14) {
                              if (d(parambc, (a.c.d)localObject11))
                              {
                                localArrayList.add(localObject11);
                                if (bool14) {
                                  break label2965;
                                }
                                if (!bool13) {
                                  break label2951;
                                }
                              }
                            }
                            double d27 = a(paramo, parambc, (a.c.d)localObject11);
                            boolean bool4 = b(parambc, (a.c.d)localObject11);
                            double d36 = a(parambc, (a.c.d)localObject11);
                            localObject27 = localkb.a(localObject11, this.m, d27, ((a.d.w)localObject12).a, true, localw1.a, false, bool4, d36);
                            if (!bool14) {
                              if (a(parambc.a(((a.c.d)localObject11).e())))
                              {
                                ((kb.g_)localObject27).p = (((a.d.w)localObject12).b + a(parambc, (a.c.d)localObject11, true));
                                ((kb.g_)localObject27).n = ((a.d.w)localObject12).b;
                              }
                            }
                            if (bool14) {
                              break label2965;
                            }
                            if (a(parambc.a(((e)localObject9).h().f())))
                            {
                              ((kb.g_)localObject27).q = (localw1.b + d1 - a(parambc, ((e)localObject9).h(), false));
                              ((kb.g_)localObject27).o = (localw1.b + d1);
                            }
                          }
                        }
                        if (bool14) {
                          continue;
                        }
                        if (a(parambc.a(((a.c.d)localObject11).e())))
                        {
                          if (bool14) {
                            continue;
                          }
                          if (a(parambc.a(((e)localObject9).h().f())))
                          {
                            d7 = a(paramo, parambc, (a.c.d)localObject11, ((a.d.w)localObject12).a, ((a.d.w)localObject12).b, localw1.a, localw1.b + d1, d1, d7);
                            if (bool14) {
                              continue;
                            }
                            if (!bool13) {}
                          }
                        }
                      }
                    }
                    else
                    {
                      d9 = -1.797693134862316E+308D;
                      d14 = -1.797693134862316E+308D;
                      d23 = paramo.m(locale4);
                      localObject18 = locale4.i();
                      do
                      {
                        if (localObject18 == null) {
                          break;
                        }
                        localObject21 = paramo.r((a.c.d)localObject18);
                        boolean bool5 = c(parambc, (a.c.d)localObject18);
                        double d40 = a(parambc, (a.c.d)localObject18);
                        if (bool13) {
                          break label9266;
                        }
                        if (((a.d.w)localObject21).a != d23)
                        {
                          double d45 = a(paramo, parambc, (a.c.d)localObject18);
                          kb.g_ localg_2 = localkb.a(localObject18, localObject7, this.m, d45, ((a.d.w)localObject21).a, true, d23, true, bool5, d40);
                          if (bool14) {
                            continue;
                          }
                          if (a(parambc.a(((a.c.d)localObject18).e())))
                          {
                            localg_2.p = (((a.d.w)localObject21).b + a(parambc, (a.c.d)localObject18, true));
                            localg_2.n = ((a.d.w)localObject21).b;
                            if (bool14) {
                              continue;
                            }
                            if (!bool13) {}
                          }
                        }
                        else
                        {
                          d9 = Math.max(d9, ((a.d.w)localObject21).b + a(parambc, (a.c.d)localObject18, true));
                          d14 = Math.max(d9, ((a.d.w)localObject21).b);
                        }
                        localObject18 = ((a.c.d)localObject18).j();
                      } while (!bool13);
                      localObject18 = null;
                      localObject18 = new Object();
                      if (bool14) {
                        break label8391;
                      }
                      localObject21 = locale4.h();
                      do
                      {
                        if (localObject21 == null) {
                          break;
                        }
                        e locale5 = ((a.c.d)localObject21).f();
                        localObject25 = a(locale5, parambc);
                        if (bool14) {
                          break label8396;
                        }
                        if (bool13) {
                          break label8391;
                        }
                        if (localObject25 == null)
                        {
                          localObject27 = locale5.h();
                          a.d.w localw6 = paramo.s((a.c.d)localObject27);
                          if (bool14) {
                            continue;
                          }
                          if (localw6.a != d23)
                          {
                            double d48 = a(paramo, parambc, (a.c.d)localObject21);
                            bool12 = c(parambc, (a.c.d)localObject21);
                            d54 = a(parambc, (a.c.d)localObject21);
                            localg_8 = localkb.a(localObject21, localObject18, this.m, d48, d23, true, localw6.a, false, bool12, d54);
                            if (!bool14)
                            {
                              if (a(parambc.a(((a.c.d)localObject27).f())))
                              {
                                localg_8.q = (localw6.b + d1 - a(parambc, (a.c.d)localObject27, false));
                                localg_8.o = (localw6.b + d1);
                              }
                              localg_8.p = d9;
                              localg_8.n = d14;
                            }
                            if (bool14) {
                              continue;
                            }
                            if (!bool13) {}
                          }
                        }
                        else if (!localObject25.equals(localObject7))
                        {
                          double d43 = paramo.m(locale5);
                          if (bool14) {
                            continue;
                          }
                          if (d23 != d43)
                          {
                            boolean bool10 = c(parambc, (a.c.d)localObject21);
                            double d51 = a(parambc, (a.c.d)localObject21);
                            localkb.a(localObject21, d23, true, d43, false, bool10, d51);
                          }
                        }
                        localObject21 = ((a.c.d)localObject21).i();
                      } while (!bool13);
                    }
                  }
                  localObject6 = ((v)localObject6).a();
                  if (bool14) {
                    break label8405;
                  }
                } while (!bool13);
              } while (bool14);
              localObject6 = localvb2.c().f();
              Object localObject24;
              do
              {
                do
                {
                  if (localObject6 == null) {
                    break;
                  }
                  locale4 = (e)((v)localObject6).c();
                  if (bool13) {
                    break label9266;
                  }
                  if (!this.c.h(locale4))
                  {
                    localObject7 = a(locale4, parambc);
                    if (bool14) {
                      break label4122;
                    }
                    if (localObject7 != null)
                    {
                      d9 = 1.7976931348623157E+308D;
                      d14 = 1.7976931348623157E+308D;
                      d23 = paramo.m(locale4);
                      localObject18 = locale4.h();
                      do
                      {
                        if (localObject18 == null) {
                          break;
                        }
                        localObject21 = paramo.s((a.c.d)localObject18);
                        if (bool13) {
                          break label9266;
                        }
                        if (d23 != ((a.d.w)localObject21).a)
                        {
                          double d37 = a(paramo, parambc, (a.c.d)localObject18);
                          boolean bool8 = c(parambc, (a.c.d)localObject18);
                          double d46 = a(parambc, (a.c.d)localObject18);
                          kb.g_ localg_3 = localkb.a(localObject18, localObject7, this.m, d37, d23, false, ((a.d.w)localObject21).a, false, bool8, d46);
                          if (bool14) {
                            continue;
                          }
                          if (a(parambc.a(((a.c.d)localObject18).f())))
                          {
                            localg_3.q = (((a.d.w)localObject21).b + d1 - a(parambc, (a.c.d)localObject18, false));
                            localg_3.o = (((a.d.w)localObject21).b + d1);
                            if (bool14) {
                              continue;
                            }
                            if (!bool13) {}
                          }
                        }
                        else
                        {
                          d9 = Math.min(d9, ((a.d.w)localObject21).b + d1 - a(parambc, (a.c.d)localObject18, false));
                          d14 = Math.min(d9, ((a.d.w)localObject21).b + d1);
                        }
                        localObject18 = ((a.c.d)localObject18).i();
                      } while (!bool13);
                      localObject18 = null;
                      localObject18 = new Object();
                      if (bool14) {
                        break label8391;
                      }
                      localObject21 = locale4.i();
                      do
                      {
                        if (localObject21 == null) {
                          break;
                        }
                        localObject24 = ((a.c.d)localObject21).e();
                        localObject25 = a((e)localObject24, parambc);
                        if (bool14) {
                          break label8396;
                        }
                        if (bool13) {
                          break label8391;
                        }
                        if (localObject25 == null)
                        {
                          a.c.d locald12 = ((e)localObject24).i();
                          a.d.w localw7 = paramo.r(locald12);
                          if (bool14) {
                            continue;
                          }
                          if (localw7.a != d23)
                          {
                            double d49 = a(paramo, parambc, locald12);
                            bool12 = c(parambc, locald12);
                            d54 = a(parambc, locald12);
                            localg_8 = localkb.a(locald12, localObject18, this.m, d49, localw7.a, true, d23, false, bool12, d54);
                            if (!bool14)
                            {
                              if (a(parambc.a(locald12.e())))
                              {
                                localg_8.p = (localw7.b + a(parambc, locald12, true));
                                localg_8.n = localw7.b;
                              }
                              localg_8.q = d9;
                            }
                            localg_8.o = d14;
                          }
                        }
                        localObject21 = ((a.c.d)localObject21).j();
                      } while (!bool13);
                    }
                  }
                  localObject6 = ((v)localObject6).a();
                  if (bool14) {
                    break label8405;
                  }
                } while (!bool13);
                d5 += a(paramo, parambc, localvb1, d2, localvb3, d6, localkb, localArrayList, d1, d7);
              } while (bool14);
              localObject6 = ((vb)localObject4).c().f();
              Object localObject13;
              double d31;
              do
              {
                do
                {
                  if (localObject6 == null) {
                    break;
                  }
                  locale4 = (e)((v)localObject6).c();
                  if (bool13) {
                    break label9266;
                  }
                  if (!this.c.h(locale4))
                  {
                    double d8 = paramo.m(locale4);
                    localObject10 = a(locale4, parambc);
                    Object localObject16;
                    if (!bool14)
                    {
                      if (localObject10 == null)
                      {
                        a.c.d locald5 = locale4.h();
                        localObject12 = locald5.f();
                        localObject13 = a((e)localObject12, parambc);
                        if (!bool14)
                        {
                          if (localObject13 == null)
                          {
                            localObject16 = locale4.i();
                            localObject18 = ((e)localObject12).h();
                            if (bool14) {
                              continue;
                            }
                            if (!d(parambc, (a.c.d)localObject16))
                            {
                              localObject21 = paramo.r((a.c.d)localObject16);
                              localObject24 = paramo.s((a.c.d)localObject18);
                              paramo.a(locale4, ((a.d.w)localObject21).a, d3);
                              paramo.a((e)localObject12, ((a.d.w)localObject24).a, d3);
                              if (!bool14)
                              {
                                if (((a.d.w)localObject21).a != ((a.d.w)localObject24).a)
                                {
                                  localObject25 = localkb.a(localObject16);
                                  d44 = ((kb.g_)localObject25).h;
                                  if (bool14) {
                                    break label4766;
                                  }
                                  if (!Double.isNaN(d44)) {
                                    if (((kb.g_)localObject25).s)
                                    {
                                      a.c.z localz3 = a((a.c.d)localObject16);
                                      if (!bool14)
                                      {
                                        if (((a.d.w)localObject21).a < ((a.d.w)localObject24).a)
                                        {
                                          localz3.add(new Point2D.Double(((a.d.w)localObject21).a, d44 - (((kb.g_)localObject25).u - ((kb.g_)localObject25).f)));
                                          if (!bool14) {
                                            if (((kb.g_)localObject25).u != ((kb.g_)localObject25).v)
                                            {
                                              localz3.add(new Point2D.Double(((kb.g_)localObject25).u, d44));
                                              localz3.add(new Point2D.Double(((kb.g_)localObject25).v, d44));
                                            }
                                          }
                                          d52 = d44 + (((kb.g_)localObject25).g - ((kb.g_)localObject25).v);
                                          if (bool14) {
                                            break label4689;
                                          }
                                          if (!bool13) {
                                            break label4647;
                                          }
                                        }
                                        localz3.add(new Point2D.Double(((a.d.w)localObject21).a, d44 - (((kb.g_)localObject25).g - ((kb.g_)localObject25).v)));
                                        if (bool14) {}
                                      }
                                      else if (((kb.g_)localObject25).u != ((kb.g_)localObject25).v)
                                      {
                                        localz3.add(new Point2D.Double(((kb.g_)localObject25).v, d44));
                                        localz3.add(new Point2D.Double(((kb.g_)localObject25).u, d44));
                                      }
                                      double d52 = d44 + (((kb.g_)localObject25).u - ((kb.g_)localObject25).f);
                                      paramo.d((a.c.d)localObject16, new a.d.w(((a.d.w)localObject24).a, d52));
                                      paramo.c((a.c.d)localObject18, new a.d.w(((a.d.w)localObject24).a, d52));
                                      if (bool14) {
                                        break label4766;
                                      }
                                      if (!bool13) {}
                                    }
                                    else
                                    {
                                      paramo.d((a.c.d)localObject16, new a.d.w(((a.d.w)localObject21).a, d44));
                                      paramo.c((a.c.d)localObject18, new a.d.w(((a.d.w)localObject24).a, d44));
                                    }
                                  }
                                }
                                paramo.c(locald5, paramo.s((a.c.d)localObject16));
                                paramo.d(locald5, paramo.r(((e)localObject12).h()));
                              }
                              if (bool14) {
                                continue;
                              }
                              if (!bool13) {}
                            }
                          }
                          else
                          {
                            paramo.a(locale4, d8, d3);
                          }
                        }
                        else
                        {
                          if (bool14) {
                            continue;
                          }
                          if (!bool13) {}
                        }
                      }
                      else
                      {
                        paramo.a(locale4, d8, d3);
                      }
                    }
                    else
                    {
                      if ((bool14) || (localkb.c(localObject10)))
                      {
                        double d15 = localkb.g(localObject10);
                        paramo.a(locale4, d8, d15);
                        localObject13 = locale4.i();
                        do
                        {
                          if (localObject13 == null) {
                            break;
                          }
                          localObject16 = paramo.r((a.c.d)localObject13);
                          if (bool13) {
                            break label9266;
                          }
                          if (((a.d.w)localObject16).a != d8)
                          {
                            d31 = localkb.d(localObject13);
                            if (!bool14)
                            {
                              if (!Double.isNaN(d31))
                              {
                                paramo.d((a.c.d)localObject13, new a.d.w(((a.d.w)localObject16).a, d31));
                                if (bool14) {
                                  continue;
                                }
                                if (!bool13) {}
                              }
                              else
                              {
                                paramo.d((a.c.d)localObject13, new a.d.w(((a.d.w)localObject16).a, d15));
                              }
                            }
                            else
                            {
                              if (bool14) {
                                continue;
                              }
                              if (!bool13) {}
                            }
                          }
                          else
                          {
                            paramo.d((a.c.d)localObject13, new a.d.w(((a.d.w)localObject16).a, d15));
                          }
                          localObject13 = ((a.c.d)localObject13).j();
                        } while (!bool13);
                      }
                      if (bool14) {
                        break label8391;
                      }
                      a.c.d locald6 = locale4.h();
                      do
                      {
                        if (locald6 == null) {
                          break;
                        }
                        localObject12 = locald6.f();
                        localObject13 = a((e)localObject12, parambc);
                        if (bool14) {
                          break label8396;
                        }
                        if (bool13) {
                          break label8391;
                        }
                        if (localObject13 == null)
                        {
                          localObject16 = paramo.s(((e)localObject12).h());
                          paramo.a((e)localObject12, d8, d3);
                          if (bool14) {
                            continue;
                          }
                          if (((a.d.w)localObject16).a != d8)
                          {
                            d31 = localkb.d(locald6);
                            if (bool14) {
                              continue;
                            }
                            if (!Double.isNaN(d31))
                            {
                              paramo.d(locald6, new a.d.w(d8, d31));
                              paramo.c(((e)localObject12).h(), new a.d.w(((a.d.w)localObject16).a, d31));
                              if (bool14) {
                                continue;
                              }
                              if (!bool13) {}
                            }
                          }
                        }
                        else
                        {
                          double d28 = paramo.m((e)localObject12);
                          paramo.a((e)localObject12, d28, d3);
                          if ((bool14) || (!localObject13.equals(localObject10)))
                          {
                            if (bool14) {
                              continue;
                            }
                            if (d8 != d28)
                            {
                              d34 = localkb.d(locald6);
                              if (bool14) {
                                continue;
                              }
                              if (!Double.isNaN(d34))
                              {
                                localObject25 = a(locald6);
                                ((a.c.z)localObject25).add(new Point2D.Double(d8, d34));
                                ((a.c.z)localObject25).add(new Point2D.Double(d28, d34));
                              }
                            }
                          }
                        }
                        locald6 = locald6.i();
                      } while (!bool13);
                    }
                  }
                  localObject6 = ((v)localObject6).a();
                  if (bool14) {
                    break label8405;
                  }
                } while (!bool13);
              } while (bool14);
              localObject6 = localvb2.c().f();
              do
              {
                if (localObject6 == null) {
                  break label9257;
                }
                locale4 = (e)((v)localObject6).c();
                if (bool13) {
                  break label9266;
                }
                if (!this.c.h(locale4))
                {
                  localObject8 = a(locale4, parambc);
                  if (bool14) {
                    break label5698;
                  }
                  if (localObject8 != null)
                  {
                    d9 = paramo.m(locale4);
                    double d16;
                    if ((bool14) || (localkb.c(localObject8)))
                    {
                      d16 = localkb.g(localObject8);
                      paramo.a(locale4, d9, d16);
                      localObject13 = locale4.h();
                    }
                    Object localObject17;
                    while (localObject13 != null)
                    {
                      localObject17 = paramo.s((a.c.d)localObject13);
                      if (bool13) {
                        break label9266;
                      }
                      if (((a.d.w)localObject17).a != d9)
                      {
                        d31 = localkb.d(localObject13);
                        paramo.c((a.c.d)localObject13, new a.d.w(((a.d.w)localObject17).a, d31));
                        if (bool14) {
                          break label5502;
                        }
                        if (!bool13) {}
                      }
                      else
                      {
                        paramo.c((a.c.d)localObject13, new a.d.w(((a.d.w)localObject17).a, d16));
                      }
                      localObject13 = ((a.c.d)localObject13).i();
                      if (bool13)
                      {
                        if (bool14) {
                          break label9122;
                        }
                        paramo.a(locale4, d9, d3);
                      }
                    }
                    locald7 = locale4.i();
                    do
                    {
                      if (locald7 == null) {
                        break;
                      }
                      localObject12 = locald7.e();
                      localObject13 = a((e)localObject12, parambc);
                      if (bool14) {
                        break label8396;
                      }
                      if (bool13) {
                        break label8391;
                      }
                      if (localObject13 == null)
                      {
                        localObject17 = ((e)localObject12).i();
                        a.d.w localw4 = paramo.r((a.c.d)localObject17);
                        if ((bool14) || (localw4.a != d9))
                        {
                          d34 = localkb.d(localObject17);
                          if (bool14) {
                            continue;
                          }
                          if (!Double.isNaN(d34))
                          {
                            paramo.d((a.c.d)localObject17, new a.d.w(localw4.a, d34));
                            paramo.c(locald7, new a.d.w(d9, d34));
                            if (bool14) {
                              continue;
                            }
                            if (!bool13) {}
                          }
                        }
                        else
                        {
                          paramo.a((e)localObject12, new a.d.w(d9, d3));
                        }
                      }
                      locald7 = locald7.j();
                    } while (!bool13);
                  }
                }
                localObject6 = ((v)localObject6).a();
                if (bool14) {
                  break label8405;
                }
              } while (!bool13);
            }
          }
          if (bool14) {
            break label9534;
          }
        }
        if (i3 != 0)
        {
          localObject6 = ((vb)localObject4).c().f();
          Object localObject22;
          do
          {
            do
            {
              if (localObject6 == null) {
                break;
              }
              locale4 = (e)((v)localObject6).c();
              if (bool13) {
                break label9266;
              }
              if (!this.c.h(locale4))
              {
                localObject8 = a(locale4, parambc);
                double d24;
                if (localObject8 == null)
                {
                  a.c.d locald1 = locale4.i();
                  localObject10 = paramo.r(locald1);
                  locald7 = locale4.h();
                  localObject12 = paramo.s(locald7);
                  if (!bool14) {
                    if (((a.d.w)localObject10).a != ((a.d.w)localObject12).a)
                    {
                      if (!bool14) {
                        if (d(parambc, locald1))
                        {
                          localArrayList.add(locald1);
                          if (bool14) {
                            break label6043;
                          }
                          if (!bool13) {
                            break label6029;
                          }
                        }
                      }
                      d24 = a(paramo, parambc, locald1);
                      boolean bool2 = b(parambc, locald1);
                      d34 = a(parambc, locald1);
                      localObject25 = localkb.a(locald1, this.m, d24, ((a.d.w)localObject10).a, true, ((a.d.w)localObject12).a, false, bool2, d34);
                      if (!bool14) {
                        if (a(parambc.a(locald1.e())))
                        {
                          ((kb.g_)localObject25).p = (((a.d.w)localObject10).b + a(parambc, locald1, true));
                          ((kb.g_)localObject25).n = ((a.d.w)localObject10).b;
                        }
                      }
                      if (bool14) {
                        break label6043;
                      }
                      if (a(parambc.a(locald7.f())))
                      {
                        ((kb.g_)localObject25).q = (((a.d.w)localObject12).b + d1 - a(parambc, locald7, false));
                        ((kb.g_)localObject25).o = (((a.d.w)localObject12).b + d1);
                      }
                    }
                  }
                  if (bool14) {
                    continue;
                  }
                  if (a(parambc.a(locald1.e())))
                  {
                    if (bool14) {
                      continue;
                    }
                    if (a(parambc.a(locald7.f())))
                    {
                      d7 = a(paramo, parambc, locald1, ((a.d.w)localObject10).a, ((a.d.w)localObject10).b, ((a.d.w)localObject12).a, ((a.d.w)localObject12).b + d1, d1, d7);
                      if (bool14) {
                        continue;
                      }
                      if (!bool13) {}
                    }
                  }
                }
                else
                {
                  double d10 = -1.797693134862316E+308D;
                  double d17 = -1.797693134862316E+308D;
                  d24 = paramo.m(locale4);
                  Object localObject19 = locale4.i();
                  do
                  {
                    if (localObject19 == null) {
                      break;
                    }
                    localObject22 = paramo.r((a.c.d)localObject19);
                    boolean bool6 = c(parambc, (a.c.d)localObject19);
                    double d41 = a(parambc, (a.c.d)localObject19);
                    if (bool13) {
                      break label9266;
                    }
                    if (((a.d.w)localObject22).a != d24)
                    {
                      d47 = a(paramo, parambc, (a.c.d)localObject19);
                      kb.g_ localg_4 = localkb.a(localObject19, localObject8, this.m, d47, ((a.d.w)localObject22).a, true, d24, false, bool6, d41);
                      if (bool14) {
                        continue;
                      }
                      if (a(parambc.a(((a.c.d)localObject19).e())))
                      {
                        localg_4.p = (((a.d.w)localObject22).b + a(parambc, (a.c.d)localObject19, true));
                        localg_4.n = ((a.d.w)localObject22).b;
                        if (bool14) {
                          continue;
                        }
                        if (!bool13) {}
                      }
                    }
                    else
                    {
                      if (bool14) {
                        continue;
                      }
                      if (a(parambc.a(((a.c.d)localObject19).e())))
                      {
                        d10 = Math.max(d10, ((a.d.w)localObject22).b + a(parambc, (a.c.d)localObject19, true));
                        d17 = Math.max(d10, ((a.d.w)localObject22).b);
                      }
                    }
                    localObject19 = ((a.c.d)localObject19).j();
                  } while (!bool13);
                  localObject19 = null;
                  localObject19 = new Object();
                  if (bool14) {
                    break label8391;
                  }
                  localObject22 = locale4.h();
                  do
                  {
                    if (localObject22 == null) {
                      break;
                    }
                    e locale6 = ((a.c.d)localObject22).f();
                    localObject26 = paramo.s((a.c.d)localObject22);
                    if (bool13) {
                      break label9266;
                    }
                    if (((a.d.w)localObject26).a != d24)
                    {
                      d44 = a(paramo, parambc, (a.c.d)localObject22);
                      boolean bool11 = c(parambc, (a.c.d)localObject22);
                      double d53 = a(parambc, (a.c.d)localObject22);
                      kb.g_ localg_7 = localkb.a(localObject22, localObject19, this.m, d44, d24, false, ((a.d.w)localObject26).a, false, bool11, d53);
                      if (!bool14)
                      {
                        if (a(parambc.a(locale6)))
                        {
                          localg_7.q = (((a.d.w)localObject26).b + d1 - a(parambc, (a.c.d)localObject22, false));
                          localg_7.o = (((a.d.w)localObject26).b + d1);
                        }
                        localg_7.p = d10;
                      }
                      localg_7.n = d17;
                    }
                    localObject22 = ((a.c.d)localObject22).i();
                  } while (!bool13);
                }
              }
              localObject6 = ((v)localObject6).a();
              if (bool14) {
                break label9266;
              }
            } while (!bool13);
            d5 += a(paramo, parambc, localvb1, d2, localvb3, d6, localkb, localArrayList, d1, d7);
          } while (bool14);
          localObject6 = ((vb)localObject4).c().f();
          do
          {
            if (localObject6 == null) {
              break label9257;
            }
            locale4 = (e)((v)localObject6).c();
            if (bool13) {
              break label9266;
            }
            if (!this.c.h(locale4))
            {
              localObject8 = a(locale4, parambc);
              Object localObject14;
              if (localObject8 == null)
              {
                a.c.d locald2 = locale4.i();
                localObject10 = paramo.r(locald2);
                a.c.d locald8 = locale4.h();
                localObject12 = paramo.s(locald8);
                if (!bool14)
                {
                  if (d(parambc, locald2))
                  {
                    if (bool14) {
                      continue;
                    }
                    if (((a.d.w)localObject10).a != ((a.d.w)localObject12).a) {}
                  }
                  else
                  {
                    paramo.a(locale4, ((a.d.w)localObject10).a, d3);
                  }
                }
                else
                {
                  if (bool14) {
                    continue;
                  }
                  if (((a.d.w)localObject10).a != ((a.d.w)localObject12).a)
                  {
                    localObject14 = localkb.a(locald2);
                    double d29 = ((kb.g_)localObject14).h;
                    if (bool14) {
                      continue;
                    }
                    if (!Double.isNaN(d29)) {
                      if (!bool14)
                      {
                        if (((kb.g_)localObject14).s)
                        {
                          localObject22 = a(locald2);
                          if (!bool14)
                          {
                            if (((a.d.w)localObject10).a < ((a.d.w)localObject12).a)
                            {
                              ((a.c.z)localObject22).add(new Point2D.Double(((a.d.w)localObject10).a, d29 - (((kb.g_)localObject14).u - ((kb.g_)localObject14).f)));
                              if (!bool14) {
                                if (((kb.g_)localObject14).u != ((kb.g_)localObject14).v)
                                {
                                  ((a.c.z)localObject22).add(new Point2D.Double(((kb.g_)localObject14).u, d29));
                                  ((a.c.z)localObject22).add(new Point2D.Double(((kb.g_)localObject14).v, d29));
                                }
                              }
                              d38 = d29 + (((kb.g_)localObject14).g - ((kb.g_)localObject14).v);
                              if (bool14) {
                                break label7098;
                              }
                              if (!bool13) {
                                break label7056;
                              }
                            }
                            ((a.c.z)localObject22).add(new Point2D.Double(((a.d.w)localObject10).a, d29 - (((kb.g_)localObject14).g - ((kb.g_)localObject14).v)));
                            if (bool14) {}
                          }
                          else if (((kb.g_)localObject14).u != ((kb.g_)localObject14).v)
                          {
                            ((a.c.z)localObject22).add(new Point2D.Double(((kb.g_)localObject14).v, d29));
                            ((a.c.z)localObject22).add(new Point2D.Double(((kb.g_)localObject14).u, d29));
                          }
                          double d38 = d29 + (((kb.g_)localObject14).u - ((kb.g_)localObject14).f);
                          paramo.d(locald2, new a.d.w(((a.d.w)localObject12).a, d38));
                          paramo.c(locald8, new a.d.w(((a.d.w)localObject12).a, d38));
                          if (bool14) {
                            continue;
                          }
                          if (!bool13) {}
                        }
                        else
                        {
                          paramo.d(locald2, new a.d.w(((a.d.w)localObject10).a, d29));
                          paramo.c(locald8, new a.d.w(((a.d.w)localObject12).a, d29));
                        }
                      }
                      else
                      {
                        if (bool14) {
                          continue;
                        }
                        if (!bool13) {}
                      }
                    }
                  }
                }
              }
              else
              {
                double d11 = paramo.m(locale4);
                double d18;
                if ((bool14) || (localkb.c(localObject8)))
                {
                  d18 = localkb.g(localObject8);
                  paramo.a(locale4, d11, d18);
                  localObject14 = locale4.i();
                }
                while (localObject14 != null)
                {
                  a.d.w localw2 = paramo.r((a.c.d)localObject14);
                  if (bool13) {
                    break label9266;
                  }
                  if (localw2.a != d11)
                  {
                    double d32 = localkb.d(localObject14);
                    if (!bool14)
                    {
                      if (!Double.isNaN(d32))
                      {
                        paramo.d((a.c.d)localObject14, new a.d.w(localw2.a, d32));
                        if (bool14) {
                          break label7345;
                        }
                        if (!bool13) {}
                      }
                      else
                      {
                        paramo.d((a.c.d)localObject14, new a.d.w(localw2.a, d18));
                      }
                    }
                    else
                    {
                      if (bool14) {
                        break label7345;
                      }
                      if (!bool13) {}
                    }
                  }
                  else
                  {
                    paramo.d((a.c.d)localObject14, new a.d.w(localw2.a, d18));
                  }
                  localObject14 = ((a.c.d)localObject14).j();
                  if (bool13)
                  {
                    if (bool14) {
                      break label9117;
                    }
                    paramo.a(locale4, d11, d3);
                  }
                }
                locald9 = locale4.h();
                do
                {
                  if (locald9 == null) {
                    break;
                  }
                  localObject12 = paramo.s(locald9);
                  if (bool13) {
                    break label9266;
                  }
                  if (((a.d.w)localObject12).a != d11)
                  {
                    d25 = localkb.d(locald9);
                    if (bool14) {
                      continue;
                    }
                    if (!Double.isNaN(d25))
                    {
                      a.c.z localz1 = a(locald9);
                      localz1.add(new Point2D.Double(d11, d25));
                      localz1.add(new Point2D.Double(((a.d.w)localObject12).a, d25));
                    }
                  }
                  locald9 = locald9.i();
                } while (!bool13);
              }
            }
            localObject6 = ((v)localObject6).a();
            if (bool14) {
              break label9266;
            }
          } while (!bool13);
        }
      } while (bool14);
      Object localObject6 = ((vb)localObject4).c().f();
      Object localObject23;
      do
      {
        do
        {
          if (localObject6 == null) {
            break;
          }
          locale4 = (e)((v)localObject6).c();
          if (bool13) {
            break label9266;
          }
          if (!this.c.h(locale4))
          {
            localObject8 = a(locale4, parambc);
            if (localObject8 == null)
            {
              a.c.d locald3 = locale4.i();
              localObject10 = paramo.r(locald3);
              locald9 = locale4.h();
              localObject12 = paramo.s(locald9);
              if (!bool14) {
                if (((a.d.w)localObject10).a != ((a.d.w)localObject12).a)
                {
                  if (!bool14) {
                    if (d(parambc, locald3))
                    {
                      localArrayList.add(locald3);
                      if (bool14) {
                        break label7825;
                      }
                      if (!bool13) {
                        break label7811;
                      }
                    }
                  }
                  d25 = a(paramo, parambc, locald3);
                  boolean bool3 = b(parambc, locald3);
                  double d35 = a(parambc, locald3);
                  localObject26 = localkb.a(locald9, this.m, d25, ((a.d.w)localObject10).a, true, ((a.d.w)localObject12).a, false, bool3, d35);
                  if (!bool14) {
                    if (a(parambc.a(locald3.e())))
                    {
                      ((kb.g_)localObject26).p = (((a.d.w)localObject10).b + a(parambc, locald3, true));
                      ((kb.g_)localObject26).n = ((a.d.w)localObject10).b;
                    }
                  }
                  if (bool14) {
                    break label7825;
                  }
                  if (a(parambc.a(locald9.f())))
                  {
                    ((kb.g_)localObject26).q = (((a.d.w)localObject12).b + d1 - a(parambc, locald9, false));
                    ((kb.g_)localObject26).o = (((a.d.w)localObject12).b + d1);
                  }
                }
              }
              if (bool14) {
                continue;
              }
              if (a(parambc.a(locald3.e())))
              {
                if (bool14) {
                  continue;
                }
                if (a(parambc.a(locald9.f())))
                {
                  d7 = a(paramo, parambc, locald3, ((a.d.w)localObject10).a, ((a.d.w)localObject10).b, ((a.d.w)localObject12).a, ((a.d.w)localObject12).b + d1, d1, d7);
                  if (bool14) {
                    continue;
                  }
                  if (!bool13) {}
                }
              }
            }
            else
            {
              double d12 = 1.7976931348623157E+308D;
              double d19 = 1.7976931348623157E+308D;
              d25 = paramo.m(locale4);
              Object localObject20 = locale4.h();
              double d42;
              do
              {
                if (localObject20 == null) {
                  break;
                }
                localObject23 = paramo.s((a.c.d)localObject20);
                boolean bool7 = c(parambc, (a.c.d)localObject20);
                d42 = a(parambc, (a.c.d)localObject20);
                if (bool13) {
                  break label9266;
                }
                if (d25 != ((a.d.w)localObject23).a)
                {
                  d47 = a(paramo, parambc, (a.c.d)localObject20);
                  kb.g_ localg_5 = localkb.a(localObject20, localObject8, this.m, d47, d25, false, ((a.d.w)localObject23).a, false, bool7, d42);
                  if (bool14) {
                    continue;
                  }
                  if (a(parambc.a(((a.c.d)localObject20).f())))
                  {
                    localg_5.q = (((a.d.w)localObject23).b + d1 - a(parambc, (a.c.d)localObject20, false));
                    localg_5.o = (((a.d.w)localObject23).b + d1);
                    if (bool14) {
                      continue;
                    }
                    if (!bool13) {}
                  }
                }
                else
                {
                  d12 = Math.min(d12, ((a.d.w)localObject23).b + d1 - a(parambc, (a.c.d)localObject20, false));
                  d19 = Math.min(d19, ((a.d.w)localObject23).b + d1);
                }
                localObject20 = ((a.c.d)localObject20).i();
              } while (!bool13);
              localObject20 = null;
              localObject20 = new Object();
              if (bool14) {
                break label8391;
              }
              localObject23 = locale4.i();
              do
              {
                if (localObject23 == null) {
                  break;
                }
                a.d.w localw5 = paramo.r((a.c.d)localObject23);
                if (bool13) {
                  break label9266;
                }
                if (localw5.a != d25)
                {
                  d42 = a(paramo, parambc, (a.c.d)localObject23);
                  boolean bool9 = c(parambc, (a.c.d)localObject23);
                  double d50 = a(parambc, (a.c.d)localObject23);
                  kb.g_ localg_6 = localkb.a(localObject23, localObject20, this.m, d42, localw5.a, true, d25, false, bool9, d50);
                  if (!bool14)
                  {
                    if (a(parambc.a(((a.c.d)localObject23).e())))
                    {
                      localg_6.p = (localw5.b + a(parambc, (a.c.d)localObject23, true));
                      localg_6.n = localw5.b;
                    }
                    localg_6.q = d12;
                  }
                  localg_6.o = d19;
                }
                localObject23 = ((a.c.d)localObject23).j();
              } while (!bool13);
            }
          }
          localObject6 = ((v)localObject6).a();
          if (bool14) {
            break label9266;
          }
        } while (!bool13);
        d5 += a(paramo, parambc, localvb1, d2, localvb3, d6, localkb, localArrayList, d1, d7);
      } while (bool14);
      localObject6 = ((vb)localObject4).c().f();
      if (localObject6 != null) {}
      while (bool14)
      {
        locale4 = (e)((v)localObject6).c();
        if (bool13) {
          break label9266;
        }
        if (!this.c.h(locale4))
        {
          localObject8 = a(locale4, parambc);
          Object localObject15;
          if (localObject8 == null)
          {
            a.c.d locald4 = locale4.h();
            localObject10 = paramo.s(locald4);
            a.c.d locald10 = locale4.i();
            localObject12 = paramo.r(locald10);
            if (!bool14)
            {
              if (d(parambc, locald4))
              {
                if (bool14) {
                  break label9254;
                }
                if (((a.d.w)localObject12).a != ((a.d.w)localObject10).a) {}
              }
              else
              {
                paramo.a(locale4, ((a.d.w)localObject12).a, d3);
              }
            }
            else
            {
              if (bool14) {
                break label9254;
              }
              if (((a.d.w)localObject12).a != ((a.d.w)localObject10).a)
              {
                localObject15 = localkb.a(locald4);
                double d30 = ((kb.g_)localObject15).h;
                if (bool14) {
                  break label9254;
                }
                if (!Double.isNaN(d30)) {
                  if (!bool14)
                  {
                    if (((kb.g_)localObject15).s)
                    {
                      localObject23 = a(locald10);
                      if (!bool14)
                      {
                        if (((a.d.w)localObject12).a < ((a.d.w)localObject10).a)
                        {
                          ((a.c.z)localObject23).add(new Point2D.Double(((a.d.w)localObject12).a, d30 - (((kb.g_)localObject15).u - ((kb.g_)localObject15).f)));
                          if (!bool14) {
                            if (((kb.g_)localObject15).u != ((kb.g_)localObject15).v)
                            {
                              ((a.c.z)localObject23).add(new Point2D.Double(((kb.g_)localObject15).u, d30));
                              ((a.c.z)localObject23).add(new Point2D.Double(((kb.g_)localObject15).v, d30));
                            }
                          }
                          d39 = d30 + (((kb.g_)localObject15).g - ((kb.g_)localObject15).v);
                          if (bool14) {
                            break label8860;
                          }
                          if (!bool13) {
                            break label8818;
                          }
                        }
                        ((a.c.z)localObject23).add(new Point2D.Double(((a.d.w)localObject12).a, d30 - (((kb.g_)localObject15).g - ((kb.g_)localObject15).v)));
                        if (bool14) {}
                      }
                      else if (((kb.g_)localObject15).u != ((kb.g_)localObject15).v)
                      {
                        ((a.c.z)localObject23).add(new Point2D.Double(((kb.g_)localObject15).v, d30));
                        ((a.c.z)localObject23).add(new Point2D.Double(((kb.g_)localObject15).u, d30));
                      }
                      double d39 = d30 + (((kb.g_)localObject15).u - ((kb.g_)localObject15).f);
                      paramo.d(locald10, new a.d.w(((a.d.w)localObject10).a, d39));
                      paramo.c(locald4, new a.d.w(((a.d.w)localObject10).a, d39));
                      if (bool14) {
                        break label9254;
                      }
                      if (!bool13) {}
                    }
                    else
                    {
                      paramo.d(locald10, new a.d.w(((a.d.w)localObject12).a, d30));
                      paramo.c(locald4, new a.d.w(((a.d.w)localObject10).a, d30));
                    }
                  }
                  else
                  {
                    if (bool14) {
                      break label9254;
                    }
                    if (!bool13) {}
                  }
                }
              }
            }
          }
          else
          {
            double d13 = paramo.m(locale4);
            double d20;
            if ((bool14) || (localkb.c(localObject8)))
            {
              d20 = localkb.g(localObject8);
              paramo.a(locale4, d13, d20);
              localObject15 = locale4.h();
            }
            for (;;)
            {
              if (localObject15 != null)
              {
                a.d.w localw3 = paramo.s((a.c.d)localObject15);
                if (bool13) {
                  break label9266;
                }
                if (localw3.a != d13)
                {
                  double d33 = localkb.d(localObject15);
                  if (!bool14)
                  {
                    if (!Double.isNaN(d33))
                    {
                      paramo.c((a.c.d)localObject15, new a.d.w(localw3.a, d33));
                      if (bool14) {
                        break label9107;
                      }
                      if (!bool13) {}
                    }
                    else
                    {
                      paramo.c((a.c.d)localObject15, new a.d.w(localw3.a, d20));
                    }
                  }
                  else
                  {
                    if (bool14) {
                      break label9107;
                    }
                    if (!bool13) {}
                  }
                }
                else
                {
                  paramo.c((a.c.d)localObject15, new a.d.w(localw3.a, d20));
                }
                localObject15 = ((a.c.d)localObject15).i();
                if (bool13)
                {
                  if (bool14) {
                    break;
                  }
                  paramo.a(locale4, d13, d3);
                }
              }
            }
            a.c.d locald11 = locale4.i();
            do
            {
              if (locald11 == null) {
                break;
              }
              localObject12 = paramo.r(locald11);
              if (bool13) {
                break label9266;
              }
              if (((a.d.w)localObject12).a != d13)
              {
                double d26 = localkb.d(locald11);
                if (bool14) {
                  continue;
                }
                if (!Double.isNaN(d26))
                {
                  a.c.z localz2 = a(locald11);
                  localz2.add(new Point2D.Double(((a.d.w)localObject12).a, d26));
                  localz2.add(new Point2D.Double(d13, d26));
                }
              }
              locald11 = locald11.j();
            } while (!bool13);
          }
        }
        localObject6 = ((v)localObject6).a();
        if (bool14) {
          break label9266;
        }
        if (!bool13) {
          break label8381;
        }
      }
      if (!this.r) {
        d1 += d5;
      }
      this.b.b(paramo, localkb, localvb3, parambc, true, d1);
      this.b.a(paramo, (f)localObject2, localvb3, parambc, d1, (Map)localObject1);
      this.c.c(localkb, localvb3, true, d1);
      if (!bool14)
      {
        if (bool13)
        {
          this.A = localvb1.f();
          if (!bool14)
          {
            if (this.A != null)
            {
              localObject4 = localkb.a(this.A, 0.0D, this.A.d(), 0.0D, -1.797693134862316E+308D, true, 1.7976931348623157E+308D, true);
              ((kb.g_)localObject4).p = (this.A.h() + this.A.b());
              ((kb.g_)localObject4).n = ((kb.g_)localObject4).p;
            }
            localkb.u();
            this.b.a(paramo, (f)localObject2, localvb1, parambc, d1, (Map)localObject1);
            if (bool14) {
              break label9517;
            }
          }
          if (this.A != null)
          {
            double d4 = localkb.d(this.A);
            this.A.d(d4 - this.A.h());
            c(this.A, paramo);
          }
        }
        this.b.b(paramo, localkb, localvb1, parambc, false, 0.0D);
        this.b.a(paramo, (f)localObject2, localvb1, parambc, 0.0D, (Map)localObject1);
        this.c.c(localkb, localvb1, false, 0.0D);
        i1++;
      }
    } while (!bool13);
    label1024:
    label1058:
    label1065:
    label1208:
    label1466:
    label1479:
    label1864:
    label1878:
    label8818:
    label9333:
    return;
  }
  
  private double a(bc parambc, a.c.d paramd)
  {
    return this.d ? 0.0D : parambc.a(paramd).m().j();
  }
  
  private boolean b(bc parambc, a.c.d paramd)
  {
    boolean bool = d.R;
    if (!bool) {
      if ((!this.d) && ((bool) || (parambc != null)))
      {
        if (bool) {
          break label60;
        }
        if (parambc.a(paramd).m() != null) {
          break label48;
        }
      }
    }
    return false;
    label48:
    label60:
    oc localoc = parambc.a(paramd).m().i();
    if (!bool) {}
    return localoc.c() == 1;
  }
  
  private boolean c(bc parambc, a.c.d paramd)
  {
    boolean bool = d.R;
    if (!bool) {
      if ((!this.d) && ((bool) || (parambc != null)))
      {
        if (bool) {
          break label60;
        }
        if (parambc.a(paramd).m() != null) {
          break label48;
        }
      }
    }
    return false;
    label48:
    label60:
    oc localoc = parambc.a(paramd).m().i();
    if (!bool) {}
    return localoc.b() != 0;
  }
  
  private final double a(o paramo, bc parambc, a.c.d paramd, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6)
  {
    z localz = parambc.a(paramd).m();
    if (localz != null) {
      paramDouble6 = Math.max(paramDouble6, localz.c() - Math.abs(paramDouble1 - paramDouble3) - (paramDouble4 - paramDouble2));
    }
    return paramDouble6;
  }
  
  protected double a(o paramo, bc parambc, a.c.d paramd)
  {
    z localz = parambc.a(paramd).m();
    return (d.R) || (localz != null) ? localz.d() : this.q;
  }
  
  private final boolean d(bc parambc, a.c.d paramd)
  {
    boolean bool = d.R;
    if ((bool) || (this.d)) {
      return false;
    }
    z localz = parambc.a(paramd).m();
    int i1 = parambc.a(paramd.e()).d();
    if (!bool) {
      if (i1 != 6)
      {
        if (bool) {
          break label131;
        }
        if (i1 != 7) {
          break label116;
        }
      }
    }
    if (!bool) {
      if (!this.f)
      {
        if ((!bool) && (localz == null)) {
          break label114;
        }
        if (bool) {
          break label111;
        }
      }
    }
    label111:
    label114:
    return localz.i().b() == 2;
    label116:
    int i2 = parambc.a(paramd.f()).d();
    label131:
    if ((bool) || ((i2 == 6) || ((bool) || (i2 == 7))))
    {
      if (!bool) {
        if (!this.f)
        {
          if ((!bool) && (localz == null)) {
            break label198;
          }
          if (bool) {
            break label195;
          }
        }
      }
      label195:
      label198:
      return localz.i().b() == 2;
    }
    if ((bool) || (localz != null))
    {
      if (!bool) {}
      return localz.i().c() == 2;
    }
    return this.e;
  }
  
  private final double a(bc parambc, a.c.d paramd, boolean paramBoolean)
  {
    boolean bool = d.R;
    y localy = parambc.a(paramd);
    z localz = localy.m();
    if (localz != null)
    {
      if (!bool) {
        if (paramBoolean) {
          return localy.k() ? localz.b() : localz.a();
        }
      }
      return localy.k() ? localz.a() : localz.b();
    }
    if (!bool) {
      if (paramBoolean) {
        return localy.k() ? this.l : this.k;
      }
    }
    return localy.k() ? this.k : this.l;
  }
  
  private final double e(bc parambc, a.c.d paramd)
  {
    z localz = parambc.a(paramd).m();
    return (d.R) || (localz != null) ? localz.e() : this.g;
  }
  
  private final double f(bc parambc, a.c.d paramd)
  {
    z localz = parambc.a(paramd).m();
    return (d.R) || (localz != null) ? localz.c() : this.i;
  }
  
  private final double a(o paramo, bc parambc, vb paramvb1, vb paramvb2)
  {
    return this.h;
  }
  
  private final double b(o paramo, bc parambc, vb paramvb1, vb paramvb2)
  {
    return this.j;
  }
  
  private final double a(o paramo, bc parambc, vb paramvb1, double paramDouble1, vb paramvb2, double paramDouble2, kb paramkb, List paramList, double paramDouble3, double paramDouble4)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int i1 = paramvb2.e() - paramvb1.e() - 1;
    double d1 = 0.0D;
    double d2 = 0.0D;
    label206:
    label207:
    double d9;
    Object localObject1;
    label564:
    label723:
    Object localObject2;
    if (!bool2) {
      if (paramList.size() > 0)
      {
        paramkb.m();
        paramkb.q();
        paramkb.r();
        a_[] arrayOfa_ = new a_[paramList.size() * 2];
        int i2 = 0;
        do
        {
          do
          {
            if (i2 >= paramList.size()) {
              break;
            }
            a.c.d locald1 = (a.c.d)paramList.get(i2);
            double d5 = paramo.r(locald1).a;
            double d7 = paramo.s(a(locald1, i1)).a;
            arrayOfa_[(i2 * 2)] = new a_(d5, locald1);
            arrayOfa_[(i2 * 2 + 1)] = new a_(d7, locald1);
            i2++;
            if (bool2) {
              break label207;
            }
            if (bool1) {
              break label206;
            }
          } while (!bool1);
        } while (bool2);
        i2 = paramList.size() * 2;
        int i3 = 0;
        ArrayList localArrayList = new ArrayList(paramList.size());
        l.a(arrayOfa_, 0, i2, null);
        BitSet localBitSet = new BitSet(paramo.m());
        int i4 = 0;
        d8 = -1.797693134862316E+308D;
        d9 = 1.7976931348623157E+308D;
        int i6 = 0;
        if (i6 < i2) {}
        label938:
        label1085:
        while (bool2)
        {
          localObject1 = (a.c.d)arrayOfa_[i6].c;
          if (bool2) {
            break label1100;
          }
          if (bool1) {
            break label1098;
          }
          if (!bool2)
          {
            if (localBitSet.get(((a.c.d)localObject1).d()))
            {
              i3--;
              if (!bool2)
              {
                if (i3 == 0)
                {
                  double d12 = arrayOfa_[i4].a;
                  double d14 = arrayOfa_[i6].a;
                  double d16 = paramkb.c(d12, d14, 0.0D);
                  if (!bool2)
                  {
                    if (Double.isNaN(d16)) {
                      d16 = paramDouble1;
                    }
                    d16 = Math.min(d9, d16);
                  }
                  double d17 = paramkb.a(d12, d14, 0.0D);
                  if (!bool2)
                  {
                    if (Double.isNaN(d17)) {
                      d17 = paramDouble2;
                    }
                    d17 = Math.max(d8, d17);
                  }
                  int i7 = 0;
                  do
                  {
                    do
                    {
                      if (i7 >= localArrayList.size()) {
                        break;
                      }
                      a.c.d locald5 = (a.c.d)localArrayList.get(i7);
                      a.d.w localw1 = paramo.r(locald5);
                      a.d.w localw2 = paramo.s(a(locald5, i1));
                      a.c.z localz2 = a(locald5);
                      if (bool1) {
                        break label723;
                      }
                      double d18;
                      if (d17 > localw1.b)
                      {
                        localz2.add(new Point2D.Double(localw1.a, d18 = d17));
                        if (bool2) {
                          break label564;
                        }
                        if (!bool1) {}
                      }
                      else
                      {
                        localz2.add(new Point2D.Double(localw1.a, d18 = localw1.b));
                      }
                      double d19;
                      if (d16 < localw2.b + paramDouble3)
                      {
                        localz2.add(new Point2D.Double(localw2.a, d19 = d16));
                        if ((!bool2) && (!bool1)) {}
                      }
                      else
                      {
                        localz2.add(new Point2D.Double(localw2.a, d19 = localw2.b + paramDouble3));
                      }
                      double d20 = Math.abs(localw1.a - localw2.a);
                      double d21 = d19 - d18;
                      d1 = Math.max(d1, f(parambc, locald5) - d21);
                      d2 = Math.max(d2, d20 * e(parambc, locald5) - d21);
                      i7++;
                    } while (!bool1);
                    d8 = -1.797693134862316E+308D;
                    d9 = 1.7976931348623157E+308D;
                    localArrayList.clear();
                  } while (bool2);
                  i4 = i6 + 1;
                }
                localBitSet.clear(((a.c.d)localObject1).d());
              }
              if (bool2) {
                break label1085;
              }
              if (!bool1) {}
            }
            else
            {
              localBitSet.set(((a.c.d)localObject1).d());
              i3++;
            }
          }
          else
          {
            localArrayList.add(localObject1);
            localObject2 = a((a.c.d)localObject1, i1);
            double d13;
            double d15;
            if ((bool2) || (a(parambc.a(((a.c.d)localObject1).e()))))
            {
              if (!bool2)
              {
                if (this.n)
                {
                  d13 = paramo.r((a.c.d)localObject1).b + a(parambc, (a.c.d)localObject1, true);
                  d15 = (paramo.r((a.c.d)localObject1).b + paramDouble2) * 0.4D;
                  d8 = Math.max(d8, Math.min(d13, d15));
                  if (bool2) {
                    break label938;
                  }
                  if (!bool1) {}
                }
                else
                {
                  d8 = Math.max(d8, paramo.r((a.c.d)localObject1).b + a(parambc, (a.c.d)localObject1, true));
                }
              }
              else
              {
                if (bool2) {
                  break label938;
                }
                if (!bool1) {}
              }
            }
            else {
              d8 = Math.max(d8, paramo.r((a.c.d)localObject1).b);
            }
            if ((bool2) || (a(parambc.a(((a.c.d)localObject2).f()))))
            {
              if (!bool2)
              {
                if (this.n)
                {
                  d13 = paramo.s((a.c.d)localObject2).b + paramDouble3 - a(parambc, (a.c.d)localObject1, false);
                  d15 = (paramo.s((a.c.d)localObject2).b + paramDouble1) * 0.6D;
                  d9 = Math.min(d9, Math.max(d13, d15));
                  if (bool2) {
                    break label1085;
                  }
                  if (!bool1) {}
                }
                else
                {
                  d9 = Math.min(d9, paramo.s((a.c.d)localObject2).b + paramDouble3 - a(parambc, (a.c.d)localObject1, false));
                }
              }
              else
              {
                if (bool2) {
                  break label1085;
                }
                if (!bool1) {}
              }
            }
            else {
              d9 = Math.min(d9, paramo.s((a.c.d)localObject2).b + paramDouble3);
            }
          }
          i6++;
          if (!bool1) {
            break;
          }
        }
        paramkb.s();
        label1098:
        label1100:
        if ((!bool2) && (!bool1)) {
          break label1140;
        }
      }
    }
    if (!bool2)
    {
      if (this.n)
      {
        if (bool2) {
          break label1137;
        }
        paramkb.t();
      }
    }
    else {
      if (!bool1) {
        break label1140;
      }
    }
    label1137:
    paramkb.u();
    label1140:
    double d3 = paramDouble2 - paramDouble1;
    double d4 = b(paramo, parambc, paramvb1, paramvb2);
    double d6 = d4 - d3;
    double d8 = this.n ? paramkb.p() : paramkb.f(d4);
    if (!bool2) {
      if (!this.n)
      {
        d9 = d2 - d1;
        d9 = Math.min(a(paramo, parambc, paramvb1, paramvb2), d9);
        d8 = Math.max(Math.max(Math.max(paramDouble4, d8), d6), Math.max(d1, d1 + d9));
      }
    }
    int i5;
    if (!bool2)
    {
      if (i1 == 0)
      {
        if (bool2) {
          break label1688;
        }
        if (d8 != 0.0D)
        {
          i5 = 0;
          do
          {
            if (i5 >= paramList.size()) {
              break;
            }
            if (bool2) {
              break label1714;
            }
            ((Point2D.Double)a((a.c.d)paramList.get(i5)).d()).y += d8;
            i5++;
            if (bool1) {
              break label1713;
            }
          } while (!bool1);
        }
      }
      else
      {
        if (bool2) {
          break label1688;
        }
      }
    }
    else
    {
      a.c.d locald2;
      a.c.z localz1;
      Object localObject3;
      if (!bool2)
      {
        if (i1 == 2)
        {
          i5 = 0;
          do
          {
            if (i5 >= paramList.size()) {
              break;
            }
            locald2 = (a.c.d)paramList.get(i5);
            if (bool2) {
              break label1714;
            }
            localz1 = a(locald2);
            localObject1 = (Point2D.Double)localz1.a();
            localObject2 = (Point2D.Double)localz1.d();
            localz1.clear();
            localObject3 = locald2.f();
            a.c.d locald3 = ((e)localObject3).h();
            e locale = locald3.f();
            a.c.d locald4 = locale.h();
            paramo.b(locald2, a.d.w.c);
            paramo.a(locald3, a.d.w.c);
            paramo.b(locald3, a.d.w.c);
            paramo.a(locald4, a.d.w.c);
            paramo.a((e)localObject3, ((Point2D.Double)localObject1).x, ((Point2D.Double)localObject1).y);
            paramo.a(locale, ((Point2D.Double)localObject2).x, ((Point2D.Double)localObject2).y + d8);
            i5++;
            if (bool1) {
              break label1713;
            }
          } while (!bool1);
        }
        if ((bool2) || (bool2)) {
          break label1688;
        }
      }
      if (i1 == 1)
      {
        i5 = 0;
        do
        {
          if (i5 >= paramList.size()) {
            break;
          }
          locald2 = (a.c.d)paramList.get(i5);
          if (bool2) {
            break label1714;
          }
          localz1 = a(locald2);
          localObject1 = (Point2D.Double)localz1.d();
          localObject1.y += d8;
          localObject2 = locald2.f();
          localObject3 = ((e)localObject2).h();
          paramo.b(locald2, a.d.w.c);
          paramo.a((a.c.d)localObject3, a.d.w.c);
          paramo.a((e)localObject2, ((Point2D.Double)localObject1).x, ((Point2D.Double)localObject1).y);
          i5++;
          if (bool1) {
            break label1713;
          }
        } while (!bool1);
      }
    }
    if (!bool2)
    {
      if (!bool2) {
        if (d8 != 0.0D) {
          label1688:
          paramkb.i(d8);
        }
      }
      d8 = this.c.a(paramkb, d4, d8);
      label1713:
      label1714:
      if (this.A != null)
      {
        double d10 = paramkb.d(this.A);
        double d11 = c(this.B, this.A, paramo);
        if (!bool2)
        {
          if (d11 > 0.0D)
          {
            this.B.d(d10 - d11 * 0.5D - this.B.h());
            b(this.B, this.A, paramo);
            if (bool2) {
              break label1852;
            }
            this.A.g(d10 + d11 * 0.5D);
            d11 = 0.0D;
            if (!bool1) {}
          }
          else
          {
            this.B.d(d10 - this.B.h());
          }
        }
        else {
          this.A.g(d10);
        }
        label1852:
        this.B = this.A;
      }
    }
    return d8;
  }
  
  private static final a.c.d a(a.c.d paramd, int paramInt)
  {
    switch (paramInt)
    {
    case 0: 
    default: 
      return paramd;
    case 1: 
      return paramd.f().h();
    }
    return paramd.f().h().f().h();
  }
  
  private static final boolean a(ec paramec)
  {
    boolean bool = d.R;
    if (!bool) {
      if (paramec.d() != 0) {
        if (bool) {
          break label32;
        }
      }
    }
    label32:
    return paramec.d() == 5;
  }
  
  private static final Object a(e parame, bc parambc)
  {
    return parame.c() == 2 ? null : parambc.a(parame).e();
  }
  
  private final a.c.z a(a.c.d paramd)
  {
    a.c.z localz = (a.c.z)this.z.get(paramd);
    if (!d.R) {
      if (localz == null)
      {
        localz = new a.c.z();
        this.z.put(paramd, localz);
      }
    }
    return localz;
  }
  
  private void a(o paramo, bc parambc, f paramf, e parame, zc paramzc, double paramDouble, boolean paramBoolean)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    ec localec = parambc.a(parame);
    int i1 = localec.d();
    if ((bool2) || ((i1 == 2) || (i1 == 3)))
    {
      z localz = parambc.a(localec.g()).m();
      e locale = localec.f();
      localObject = paramo.o(parame);
      double d2 = paramo.m(locale);
      oc localoc = localz.i();
      if (!bool2) {
        if (i1 == 3)
        {
          if (bool2) {
            break label149;
          }
          if (localoc.d() == 1) {
            break label148;
          }
        }
      }
      if (!bool2)
      {
        if (i1 != 2) {
          break label152;
        }
        if (bool2) {
          break label149;
        }
      }
      label148:
      label149:
      label152:
      int i2 = localoc.c() == 1 ? 1 : 0;
      if (!bool2) {
        if (i2 != 0)
        {
          double d3 = localz.j() / a;
          f localf;
          if (!bool2) {
            if (paramBoolean)
            {
              if (d2 > ((a.d.w)localObject).a)
              {
                localf = new f(((a.d.w)localObject).a, d2, ((a.d.w)localObject).b + paramDouble);
                localf.b(((a.d.w)localObject).a, ((a.d.w)localObject).a + d3, ((a.d.w)localObject).b + paramDouble - d3, 1.0D);
                paramf.e(localf);
                if (!bool2) {
                  if (!bool1) {
                    break label642;
                  }
                }
              }
              else
              {
                localf = new f(d2, ((a.d.w)localObject).a, ((a.d.w)localObject).b + paramDouble);
                localf.b(((a.d.w)localObject).a - d3, ((a.d.w)localObject).a, ((a.d.w)localObject).b + paramDouble, -1.0D);
                paramf.e(localf);
              }
              if ((!bool2) && (!bool1)) {
                break label642;
              }
            }
          }
          if (d2 > ((a.d.w)localObject).a)
          {
            localf = new f(((a.d.w)localObject).a, d2, ((a.d.w)localObject).b + paramDouble);
            localf.b(((a.d.w)localObject).a, ((a.d.w)localObject).a + d3, ((a.d.w)localObject).b + paramDouble + d3, -1.0D);
            paramf.d(localf);
            if (!bool2) {
              if (!bool1) {
                break label642;
              }
            }
          }
          else
          {
            localf = new f(d2, ((a.d.w)localObject).a, ((a.d.w)localObject).b + paramDouble);
            localf.b(((a.d.w)localObject).a - d3, ((a.d.w)localObject).a, ((a.d.w)localObject).b + paramDouble, 1.0D);
            paramf.d(localf);
          }
          if ((!bool2) && (!bool1)) {
            break label642;
          }
        }
      }
      if (!bool2) {
        if (paramBoolean)
        {
          if (!bool2) {
            if (d2 > ((a.d.w)localObject).a)
            {
              paramf.a(((a.d.w)localObject).a, d2 + 1.0D, ((a.d.w)localObject).b + paramDouble);
              if (!bool2) {
                if (!bool1) {
                  break label642;
                }
              }
            }
            else
            {
              paramf.a(d2, ((a.d.w)localObject).a + 1.0D, ((a.d.w)localObject).b + paramDouble);
            }
          }
          if ((!bool2) && (!bool1)) {
            break label642;
          }
        }
      }
      if (!bool2)
      {
        if (d2 > ((a.d.w)localObject).a)
        {
          if (bool2) {
            break label639;
          }
          paramf.b(((a.d.w)localObject).a, d2 + 1.0D, ((a.d.w)localObject).b + paramDouble);
        }
      }
      else {
        if (!bool1) {
          break label642;
        }
      }
      label639:
      paramf.b(d2, ((a.d.w)localObject).a + 1.0D, ((a.d.w)localObject).b + paramDouble);
      label642:
      return;
    }
    double d1 = d();
    this.b.a(paramo, parambc, paramf, parame, paramzc, localec, paramDouble, paramBoolean);
    a.d.w localw;
    if (!bool2)
    {
      if (paramBoolean)
      {
        paramf.a(paramzc.a() - d1, paramzc.a() + paramzc.c() + d1, paramDouble + paramzc.b());
        localObject = localec.b(0);
        if (!bool2)
        {
          if (localObject != null)
          {
            ((f)localObject).b(paramzc.a());
            ((f)localObject).a(paramzc.b() + paramDouble);
            paramf.e((f)localObject);
            ((f)localObject).a(-(paramzc.b() + paramDouble));
          }
        }
        else {
          ((f)localObject).b(-paramzc.a());
        }
        locald = parame.i();
        do
        {
          if (locald == null) {
            break;
          }
          localw = paramo.s(locald);
          if ((bool2) || (localw.a >= paramzc.a() - d1))
          {
            if (bool2) {
              continue;
            }
            if (localw.a <= paramzc.a() + paramzc.c() + d1) {}
          }
          else
          {
            paramf.a(localw.a - d1, localw.a + d1, paramDouble + paramzc.b());
          }
          locald = locald.j();
        } while (!bool1);
      }
      paramf.b(paramzc.a() - d1, paramzc.a() + paramzc.c() + d1, paramDouble + paramzc.b() + paramzc.d());
    }
    Object localObject = localec.b(2);
    if (!bool2)
    {
      if (localObject != null)
      {
        ((f)localObject).b(paramzc.a());
        ((f)localObject).a(paramzc.b() + paramDouble);
        paramf.d((f)localObject);
        ((f)localObject).a(-(paramzc.b() + paramDouble));
      }
    }
    else {
      ((f)localObject).b(-paramzc.a());
    }
    a.c.d locald = parame.h();
    do
    {
      if (locald == null) {
        break;
      }
      localw = paramo.r(locald);
      if ((bool2) || (localw.a >= paramzc.a() - d1))
      {
        if (bool2) {
          continue;
        }
        if (localw.a <= paramzc.a() + paramzc.c() + d1) {}
      }
      else
      {
        paramf.b(localw.a - d1, localw.a + d1, paramDouble + paramzc.b() + paramzc.d());
      }
      locald = locald.i();
    } while (!bool1);
  }
  
  static final int a(byte paramByte, int paramInt)
  {
    if (!d.R) {
      switch (paramByte)
      {
      case 0: 
      case 3: 
      case 5: 
      case 6: 
      case 7: 
      default: 
        return paramInt;
      case 1: 
        return 0;
      case 4: 
        return 1;
      case 2: 
        return 2;
      }
    }
    return 3;
  }
  
  static final int a(cd paramcd, int paramInt)
  {
    if (!d.R) {
      if (paramcd == null) {
        return paramInt;
      }
    }
    return a(paramcd.b(), paramInt);
  }
  
  public double d()
  {
    return this.o;
  }
  
  public void a(double paramDouble)
  {
    this.o = paramDouble;
  }
  
  public double f()
  {
    return this.q;
  }
  
  public void b(double paramDouble)
  {
    this.q = paramDouble;
    this.b.a(paramDouble);
  }
  
  public void a(long paramLong)
  {
    this.t = Math.max(0L, paramLong);
  }
  
  private static class b_
    implements Comparator
  {
    e a;
    private final o c;
    
    public b_(o paramo)
    {
      this.c = paramo;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool2 = d.R;
      boolean bool1 = d.Q;
      a.c.d locald1 = (a.c.d)paramObject1;
      a.c.d locald2 = (a.c.d)paramObject2;
      double d1;
      if (!bool2) {
        if (locald1.e() == this.a)
        {
          d1 = this.c.p(locald1).b;
          if (!bool1) {
            break label92;
          }
        }
      }
      if (locald1.f() == this.a)
      {
        d1 = this.c.q(locald1).b;
        if (!bool1) {}
      }
      else
      {
        throw new IllegalStateException();
      }
      label92:
      double d2;
      if (!bool2) {
        if (locald2.e() == this.a)
        {
          d2 = this.c.p(locald2).b;
          if (bool2) {
            break label182;
          }
          if (!bool1) {
            break label177;
          }
        }
      }
      if (locald2.f() == this.a)
      {
        d2 = this.c.q(locald2).b;
        if (bool2) {
          break label182;
        }
        if (!bool1) {}
      }
      else
      {
        throw new IllegalStateException();
      }
      label177:
      label182:
      if (!bool2) {}
      if (!bool2) {}
      return d1 < d2 ? 1 : d1 > d2 ? -1 : 0;
    }
  }
  
  static final class a_
    implements Comparable
  {
    double a;
    Object c;
    
    a_(double paramDouble, Object paramObject)
    {
      this.a = paramDouble;
      this.c = paramObject;
    }
    
    public int compareTo(Object paramObject)
    {
      return l.a(this.a, ((a_)paramObject).a);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.w

 * JD-Core Version:    0.7.0.1

 */